PyCharm treats all txt files like requirements file

Viewed 620

I have requirements.txt file in my project and PyCharm works perfectly fine with it. However, it also checks every other txt file and displays misleading error messages. For example, having foo.txt file with a string

bar baz

written in it produces the following message:

<versionspec>, RequirementsTokenType.COMMENT, RequirementsTokenType.EOL, RequirementsTokenType.LSBRACE, RequirementsTokenType.SEMICOLON or RequirementsTokenType.WHITE_SPACE expected, got 'baz'

I definitely don't want PyCharm to treat all txt files like requirements file, how can I change this strange behavior?

PyCharm 2020.2.1 CE

1 Answers

This behaviour is caused by the requirements plugin, you can fix it by removing the patterns as shown bellow: requirements plugin

Related