-
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
Changes from 11 commits
45c9ad4
c75c72b
fb833ef
2956ec8
a0eb3b2
a9d6d5d
3fc936b
969bf33
2c6e8c2
f049a71
e522fc4
141f0b6
6f20797
6e4120a
0af0841
6b4d916
f5972f0
132feb3
67a2b4a
ba9ea89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
# via deprecated | ||
wtforms==2.3.3 | ||
# via | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
except DatasourceNotFound: | ||
return self.response_404() | ||
except QueryObjectValidationError as error: | ||
return self.response_400(message=error.message) | ||
|
@@ -233,7 +233,7 @@ def data(self) -> Response: | |
query_context = self._create_query_context_from_form(json_body) | ||
command = ChartDataCommand(query_context) | ||
command.validate() | ||
except DatasourceNotFound as error: | ||
except DatasourceNotFound: | ||
return self.response_404() | ||
except QueryObjectValidationError as error: | ||
return self.response_400(message=error.message) | ||
|
@@ -420,11 +420,10 @@ def _get_data_response( | |
|
||
return self._send_chart_response(result, form_data, datasource) | ||
|
||
# pylint: disable=invalid-name, no-self-use | ||
# pylint: disable=invalid-name | ||
def _load_query_context_form_from_cache(self, cache_key: str) -> dict[str, Any]: | ||
return QueryContextCacheLoader.load(cache_key) | ||
|
||
# pylint: disable=no-self-use | ||
def _create_query_context_from_form( | ||
self, form_data: dict[str, Any] | ||
) -> QueryContext: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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. |
||
) | ||
), | ||
exception, | ||
|
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,I didn't see any
cyclic-import
errors being reported.Note I did see some errors with the
.pylintrc
file:it seems like some of these options are likely deprecated.