-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
pylint
equivalent to pylint .
#9072
base: main
Are you sure you want to change the base?
pylint
equivalent to pylint .
#9072
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #9072 +/- ##
==========================================
+ Coverage 95.75% 95.77% +0.02%
==========================================
Files 173 173
Lines 18664 18669 +5
==========================================
+ Hits 17872 17881 +9
+ Misses 792 788 -4
|
Hmm, we might want to have it in a beta for a somewhat longish time, this feel incompatible with releasing in a week. On one hand the change is not supposed to be complex, on the other hand it actually is complex. Because the option parsing and configuration parsing is very complex (there's no explicit positional argument like you would expect with argparse, we're just implicitly relying on the first args being the fileçor_module if we don't have the stdin option -- maybe other condition apply). |
This comment has been minimized.
This comment has been minimized.
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.
Thanks!
Wondering if you checked pyreverse?
@@ -176,10 +176,8 @@ def __init__( | |||
return | |||
|
|||
# Display help if there are no files to lint or no checks enabled |
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.
May as well clean up this comment, as we're not displaying help (right?)
self._runtest( | ||
["--ignore-patterns=a"], reporter=TextReporter(StringIO()), code=32 |
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.
What was making the prior code emit 32?
``pylint`` is now equivalent to ``pylint .`` and won't show the help by default anymore. | ||
The help is still available with ``pylint --help`` or ``pylint --long-help``. |
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.
Let's not promise equivalence with pylint .
. I'm showing a behavior difference. Before, cd to a directory you haven't installed with pip, invoke pylint .
, you get a quick lint of the __init__.py
only; now you get the whole package linted.
I'm thinking more and more that we should base it on https://github.com/pylint-dev/pylint/pull/7496/files so we can just add a default value for |
I would be very much in favour of that, but need some direction in moving that PR forward. |
Let's move that change to 4.0.0 and try to add the |
``` def parse_known_args(self, args=None, namespace=None): if args is None: # args default to the system args args = _sys.argv[1:] else: # make sure that args are mutable args = list(args) ```
2955bee
to
b2b0571
Compare
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit b2b0571 |
Type of Changes
Description
pylint
is now equivalent topylint .
and won't show the help by default anymore.The help is still available with
pylint --help
orpylint --long-help
.Closes #5701