-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[refactor] Create a primer package in 'pylint.testutils' #6905
[refactor] Create a primer package in 'pylint.testutils' #6905
Conversation
pylint/testutils/primer/__init__.py
Outdated
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE | ||
# Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt | ||
|
||
__all__ = ["PackageToLint", "PRIMER_DIRECTORY_PATH"] |
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.
The path to the primer directory to not need to be modified because it's relative (PRIMER_DIRECTORY_PATH = Path("tests") / ".pylint_primer_tests"
)
I have been thinking about this as well, but let's not do this as long as the Just giving the list of packages we prime also doesn't make a lot of sense: if anybody would ever want to re-use our primer the first thing they'll likely change is the packages to prime. |
Pull Request Test Coverage Report for Build 2473831366
π - Coveralls |
I think temporarily adding primer's helper in pylint.testutils to be able to test them properly is a decent compromise until they mature and we cleanup, what do you think ? I want to test and modify the primer comment next. |
Hm, then let's do |
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.
To preserve backwards compatibility we might want to keep the old file and re-import there with a warning. However, I don't think there will be many packages that use this so let's not do that π
44ab3e8
to
9c14297
Compare
Yeah agree completely π Package maintainers that discovered our primer's helper are big boys and girls, they can change their export. The cleanup we'll have to do for pylint 3.0 is already beyond epic as is π |
π€ According to the primer, this change has no effect on the checked open source code. π€π This comment was generated for commit 9c14297 |
Type of Changes
Description
First step to be able to add more testable things related to primer here. I'm wondering if an external package called
pylint-testutils
wouldn't be better at this point. We don't need to ship test helper in pylint, but pytest do not like import from test file contained intests
. We might removepylint/testutils
in 3.0 and always use bleeding edge of the new package in pylint itself.