forked from PyCQA/pylint-pytest
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in pylint v3.0.0, there is pylint-dev/pylint#8404, that breaks the current implementation of: - ClassAttrLoader - FixtureChecker This fix is an attempt of supporting both pylint v2 and v3
- Loading branch information
Anis Da Silva Campos
committed
Dec 1, 2023
1 parent
fc8fa90
commit f8064a3
Showing
5 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import pylint | ||
from pylint.checkers import BaseChecker | ||
|
||
|
||
class BasePytestChecker(BaseChecker): | ||
if int(pylint.version.split(".")[0]) < 3: | ||
# Since https://github.com/pylint-dev/pylint/pull/8404, pylint does not need this | ||
# __implements__ pattern. keeping it for retro compatibility with pylint==2.x | ||
from pylint.interfaces import IAstroidChecker # pylint: disable=import-outside-toplevel | ||
|
||
__implements__ = IAstroidChecker | ||
|
||
name = "pylint-pytest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters