-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress SyntaxWarnings when parsing modules #2386
Conversation
What do you think about ignoring SyntaxWarning only if SyntaxWarning is missing from the warning filters registry, as it is by default? That would allow users to exercise control over the warnings. |
Not sure it's worth the effort. For Home Assistant the solution should be start linting all requirements as well. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2386 +/- ##
=======================================
Coverage 92.75% 92.75%
=======================================
Files 94 94
Lines 11066 11070 +4
=======================================
+ Hits 10264 10268 +4
Misses 802 802
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Jacob Walls <[email protected]>
It doesn't seem to make a difference performance wise. The first observation was probably a mistake. Never the less, I do like this version a bit more if I'm honest. The PR would be ready IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
Next step would be to update pylint-dev/pylint@2034874 as part of the astroid 3.1 upgrade.
@Pierre-Sassoulas do you want to move forward on cutting astroid 3.1? I think leaving the numpy workaround in #2375 is alright for now.
I think a new release would make sense. This, together with the fix for the |
Sure we were planning on releasing with Jacob. I was trying to find the time to check numpy pyi consistency against our astroid numpy's brain. (I don't remember the issue and I'm on mobile). It Can probably be dealt with later. |
Description
Following the conclusion in pylint-dev/pylint#9322, ignore
SyntaxWarnings
when parsing modules withast.parse
.