-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
chore: Update pylint to 2.17.4 #24700
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24700 +/- ##
=======================================
Coverage 68.95% 68.95%
=======================================
Files 1902 1902
Lines 73939 73997 +58
Branches 8176 8195 +19
=======================================
+ Hits 50984 51025 +41
- Misses 20842 20853 +11
- Partials 2113 2119 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -143,7 +143,7 @@ def get_data(self, pk: int) -> Response: | |||
query_context = self._create_query_context_from_form(json_body) | |||
command = ChartDataCommand(query_context) | |||
command.validate() | |||
except DatasourceNotFound as error: |
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.
I know some people find Pylint to be somewhat cumbersome, but I love to see Pylint every evolving which results in fixes like this—which typically flake8
et al. miss.
@@ -44,7 +44,7 @@ def __init__( | |||
super().__init__( | |||
_( | |||
self.message_format.format( | |||
object_type, '"%s" ' % object_id if object_id else "" | |||
object_type, f'"{object_id}" ' if object_id else "" |
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.
Just wondering whether the trailing space should be there. I realize it was previously, but I'm not sure if that was a typo.
Thanks @EugeneTorap for the PR. Technically we're not really bumping these packages, but more accurately re-compiling the frozen requirements by upgrading Pylint et al. which are used for CI, i.e., |
88d933f
to
0b586f7
Compare
686768b
to
a0eb3b2
Compare
@EugeneTorap you can run Pylint locally via:
|
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 again @EugeneTorap for the cleanup PR. I took another pass and left some comments.
.pylintrc
Outdated
@@ -86,6 +86,7 @@ disable= | |||
missing-docstring, | |||
duplicate-code, | |||
unspecified-encoding, | |||
cyclic-import, |
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.
Why are we blanket disabling this message? This message is typically useful and thus I would be somewhat hesitant to ignore it globally.
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.
There're hundreds of cyclic-import
errors in the project.
@john-bodley I believe that your SIP-92 Proposal for restructuring the Python code base should solve the problem!
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.
@EugeneTorap as far as I'm aware the cyclic-import
error existed in Pylint 2.9.6 and thus I'm somewhat perplexed as why this is significantly more problematic now. In general we shouldn't be relaxing most Pylint rules and thus I'm somewhat hesitant to approve something which in theory could lead to a regression.
When I pulled your branch, removed line #89 from the .pylintrc
file, and ran,
python3.9 -m pip install -r requirements/integration.txt
tox -e pylint
I didn't see any cyclic-import
errors being reported.
Note I did see some errors with the .pylintrc
file:
.pylintrc:1:0: E0015: Unrecognized option found: optimize-ast, files-output, argument-name-hint, method-name-hint, variable-name-hint, inlinevar-name-hint, const-name-hint, class-name-hint, class-attribute-name-hint, module-name-hint, attr-name-hint, function-name-hint, no-space-check (unrecognized-option)
it seems like some of these options are likely deprecated.
@@ -305,7 +305,7 @@ werkzeug==2.3.3 | |||
# flask | |||
# flask-jwt-extended | |||
# flask-login | |||
wrapt==1.12.1 | |||
wrapt==1.15.0 |
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.
I'm a tad perplexed how/where this was bumped as it's a non-direct requirement and as far as I can tell the deprecated
package (which it is a direct requirement of) wasn't bumped.
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.
@EugeneTorap if you don't mind rebasing to resolve the conflict, I think this one's ready to merge! |
@rusackas I want to improve my PR tomorrow |
# Conflicts: # superset/charts/commands/warm_up_cache.py # superset/views/core.py # superset/viz.py
ea95989
to
f5972f0
Compare
# Conflicts: # requirements/development.txt
@EugeneTorap I pushed a commit which further bumped the version of Pylint (to the maximum allowable given other constraints) to see if this would address said issue. Regrettably it didn't and I'm somewhat at a loss in terms of i) why this is occurring, and ii) why I can't reproduce it locally. The second commit I pushed was—like your prior commit—was to disable this globally given (as you pointed out previously) disabling on a per-file basis didn't seem to work. Would you mind updating the PR title/description to depict that main impetus of this PR, i.e., bumping Pylint? I'll merge the PR after that. |
Co-authored-by: John Bodley <[email protected]>
This PR bumps:
pylint
to 2.17.4 becausepylint
hasastroid
2.6.6 which depends onwrapt
<1.13 and >=1.11SUMMARY
If we use python 3.11 and want to run
superset
CLI command we have the next error:BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION