-
-
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
Prefer .pyi
stubs
#2375
Prefer .pyi
stubs
#2375
Conversation
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.
Looks like a clever way of doing thing. Regarding the error I have an intuition that our (now outdated/wrong) brain / tests and the actual content of the numpy pyi are conflicting which would be a good thing, but I don't have the time to test that hypothesis right now.
Neither do I. It's not straightfoward. A soft launch of this without numpy seems wise. Pushed an ugly workaround. |
623447b
to
684a45d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2375 +/- ##
==========================================
+ Coverage 92.76% 92.78% +0.01%
==========================================
Files 94 94
Lines 11090 11098 +8
==========================================
+ Hits 10288 10297 +9
+ Misses 802 801 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Yeah it would work 😄 But if we're right and our tests are actually outdated (high possibility seeing they are very old and numpy is under heavy development), we're going to prevent numpy from having this new feature. Tbf I did not intend to check everything just check one test to confirm or not. Trying to find the motivation to download numpy and start reading atm. (Also we have a ton of brain for numpy, I those brains could become a pylint-numpy plugin so we don't have to block astroid for lib specific behavior) . |
@Pierre-Sassoulas do you think we can get this into astroid 3.2 as is? |
2103e00
to
4407867
Compare
Co-authored-by: Pierre Sassoulas <[email protected]>
4407867
to
6e33269
Compare
Yeah we can release as is and not make astroid worse than it is at the moment. I keep this on my mind but handling the flow of issues and then, at the end of a big pile of issues, finding the motivation to open numpy's code and compare it to the astroid's numpy brains and unit tests ..is proving difficult. Might need to create an issue for the numpy / pyi / outdated tests checks in the end. |
Or a pylint numpy plugin. |
I hear you. Plus, what if we get negative user-feedback on this first push -- don't want to sink time into a big numpy yak shave that turns out to be wrong-track! |
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.
Some nits :)
Co-authored-by: Pierre Sassoulas <[email protected]>
Co-authored-by: Pierre Sassoulas <[email protected]>
Should that be standalone and a dependency for pylint-ml? |
Yeah that sounds good but we'd need a proof of concept first. Probably on a smaller lib with less users affected if we drop the brain from astroid/pylint by default to test the water. |
--ignore-patterns
for .pyi
stubs has no effect if .py resolves to .pyi anyway
pylint-dev/pylint#9623
Type of Changes
Description
Closes pylint-dev/pylint#9185