Strange warning in PyCharm

Answered

Hello,

recently I've upgraded PyCharm to newest 2017.1 EAP version. I started to get this annoying warning from editor whenever I try to create file handler with 'open' and print something to it. Like in this situation. File exists and script executes properly.

Situation occurs in all of my scripts, except situations like this:


This is piece of function that checks if user passed some name of file or None argument. In this scenario PyCharm does not complain.

Where lies the problem? Is it my lack of programming skills?

0
1 comment

It looks like a bug. Please, file an issue about it to PyCharm bug-tracker: https://youtrack.jetbrains.com/issues/PY and let me know if you have any problems.

0

Please sign in to leave a comment.