Recognize with suppress the same as try except
Answered
New in Python 3.4 is a contextlib called suppress, pycharm currently complains about all the code below a "with suppress" statement as "This code is unreachable". Is this something that can be fixed in future versions? Thanks.
Please sign in to leave a comment.
Also just realized it shows all method params that are accessed after the with statement as not being used in the methods name.
Hi! Thank you for the report.
Could you please attach a screenshot that shows the issue? What Pycharm version do you use?
PyCharm 2016.3.2
Build #PY-163.10154.50, built on December 28, 2016
JRE: 1.8.0_112-release-408-b6 x86
JVM: OpenJDK Server VM by JetBrains s.r.o
Thank you. It's known issue https://youtrack.jetbrains.com/issue/PY-16419, please follow it for updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.