-
-
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
Refactors related to separating ast creating and linting #7286
Conversation
Pull Request Test Coverage Report for Build 2856995021
π - Coveralls |
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.
This would require another refactor but wouldn't it be a good thing to create Γ 'FileGatherer' class to have something testable and decoupled from the configuration in order to decrease the responsabilities of the PyLinter class ?
self.initialize() | ||
|
||
# 2) Gather all files |
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.
We could create a _gather_all_files
fonction and remove comments.
@@ -639,23 +645,30 @@ def check(self, files_or_modules: Sequence[str] | str) -> None: | |||
"Missing filename required for --from-stdin" | |||
) | |||
|
|||
filepath = files_or_modules[0] | |||
# 3) Get all FileItems |
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.
Same with _get_all_fileitems
.
Co-authored-by: Pierre Sassoulas <[email protected]>
Wouldn't that be a bit overkill? I think it makes more sense to focus on creating a |
This comment has been minimized.
This comment has been minimized.
I'm not opinionated about creating a particular class or about a particular design, you know this part of the code better than me so you'll know better than me what to do :) But I think we need to be able to test those changes at some point, right now we need to test through the PyLinter which means it's hard and we don't. The core internal of pylint (like pylint.message, and some part of the PyLinter) should be unitary tested (well, unitary testable is a first step) . |
That's not necessarily true π
Yeah agreed. For now I'd say let's merge this and #7288. That would definelty set us up for the creation of |
π |
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit b7fc900 |
Type of Changes
Description
Refs #7263.