-
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(ci): bump pylint to 2.10.2 #16463
Conversation
@@ -86,6 +86,8 @@ disable= | |||
missing-docstring, | |||
too-many-lines, | |||
duplicate-code, | |||
unspecified-encoding, |
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 don't necessarily agree with this rule. While we could add encoding="utf-8"
to all text file opens, this would likely break compatibility with Windows which defaults to cp-1252
(not officially supported, but I know some parties in the community are running Superset on Windows). Also, adding encoding=locale.getpreferredencoding()
feels pointless. So I recommend we disable this rule for now.
2e748b3
to
0563634
Compare
exceptions: List[ValidationError] = list() | ||
exceptions: List[ValidationError] = [] |
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.
Ok, this made me chuckle. I don't remember which linter and when, but didn't some linter up until fairly recently complain about using []
and recommend using list()
instead? 😆 See use-list-literal (R1734)
and use-dict-literal (R1735)
in http://pylint.pycqa.org/en/latest/technical_reference/features.html
(FYI: I much prefer []
and {}
over list()
and dict()
respectively, so I'm really happy about this change)
Codecov Report
@@ Coverage Diff @@
## master #16463 +/- ##
==========================================
- Coverage 76.63% 76.38% -0.25%
==========================================
Files 1002 1002
Lines 53637 53639 +2
Branches 6853 6854 +1
==========================================
- Hits 41104 40972 -132
- Misses 12294 12428 +134
Partials 239 239
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -381,7 +381,7 @@ def put( # pylint: disable=arguments-differ | |||
try: | |||
new_model = UpdateAnnotationCommand(g.user, annotation_id, item).run() | |||
return self.response(200, id=new_model.id, result=item) | |||
except (AnnotationNotFoundError, AnnotationLayerNotFoundError) as ex: | |||
except (AnnotationNotFoundError, AnnotationLayerNotFoundError): |
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 always happy to see Pylint is continuing to evolve it's logic.
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 was actually really surprised this wasn't caught by older versions
@@ -68,7 +68,7 @@ def load_chart_data_into_cache( | |||
raise exc | |||
except Exception as exc: | |||
# TODO: QueryContext should support SIP-40 style errors | |||
error = exc.message if hasattr(exc, "message") else str(exc) # type: ignore # pylint: disable=no-member | |||
error = exc.message if hasattr(exc, "message") else str(exc) # type: ignore |
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.
@villebro as a side note I might do a pass to remain exc
to ex
for consistency throughout the code.
* upstream/master: (25 commits) chore(ci): bump pylint to 2.10.2 (apache#16463) fix: prevent page crash when chart can't render (apache#16464) chore: fixed slack invite link (apache#16466) fix(native-filters): handle null values in value filter (apache#16460) feat: add function list to auto-complete to Clickhouse datasource (apache#16234) refactor(explore): improve typing for Dnd controls (apache#16362) fix(explore): update overwrite button on perm change (apache#16437) feat: Draggable and Resizable Modal (apache#16394) refactor: sql_json view endpoint (apache#16441) fix(dashboard): undo and redo buttons weird alignment (apache#16417) fix: setupPlugin in chart list page (apache#16413) fix: Disable Slack notification method if no api token (apache#16367) feat: add Shillelagh DB engine spec (apache#16416) fix: copy to Clipboard order (apache#16299) docs: make FEATURE_FLAGS.md reference a link (apache#16415) chore(viz): bump superset-ui to 0.17.87 (apache#16420) feat: add activate command (apache#16404) Revert "fix(explore): let admin overwrite slice (apache#16290)" (apache#16408) fix(explore): retain chart ownership on query context update (apache#16419) chore: Removes the TODOs and uses the default page size (apache#16422) ...
SUMMARY
While working on an unrelated PR, I started getting weird linting errors from
pylint
that flip-flopped betweenand later when those were disabled
I figured this might have been fixed in the most recent 2.10.2 release of
pylint
, but sadly that wasn't the case (same flip-flop). However, since I already did the necessary corrections for 2.10, I figure we might just as well bump anyway.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION