Skip to content

Commit 845dd66

Browse files
Pierre-Sassoulasirtazaakramstdedos
committed
Add python 3.12 and pylint 3.0 compatibility
Co-authored-by: Irtaza Akram <[email protected]> Co-authored-by: Stavros Ntentos <[email protected]>
1 parent 7599c01 commit 845dd66

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

.github/workflows/run-tests.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- '3.9'
2727
- '3.10'
2828
- '3.11'
29-
# - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3
29+
- '3.12'
3030
# Python 3.6 is not available in `ubuntu-latest`.
3131
exclude:
3232
- python-version: '3.6'
@@ -35,6 +35,7 @@ jobs:
3535
- python-version: '3.6'
3636
os: ubuntu-20.04
3737

38+
3839
defaults:
3940
run:
4041
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || '/bin/bash --noprofile --norc -Eeuxo pipefail {0}' }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- Support for Python 3.12 (#24)
8+
- Support for Pylint 3 (#24)
9+
10+
511
## [1.1.6] - 2023-11-20
612

713
This is a small bugfix release.

pylint_pytest/checkers/class_attr_loader.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
from typing import Optional, Set
22

33
from astroid import Assign, Attribute, ClassDef, Name
4-
from pylint.interfaces import IAstroidChecker
54

65
from ..utils import _can_use_fixture, _is_class_autouse_fixture
76
from . import BasePytestChecker
87

98

109
class ClassAttrLoader(BasePytestChecker):
11-
__implements__ = IAstroidChecker
1210
msgs = {"E6400": ("", "pytest-class-attr-loader", "")}
1311

1412
in_setup = False

pylint_pytest/checkers/fixture.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import pylint
99
import pytest
1010
from pylint.checkers.variables import VariablesChecker
11-
from pylint.interfaces import IAstroidChecker
1211

1312
from ..utils import (
1413
_can_use_fixture,
@@ -42,7 +41,6 @@ def pytest_collectreport(self, report):
4241

4342

4443
class FixtureChecker(BasePytestChecker):
45-
__implements__ = IAstroidChecker
4644
msgs = {
4745
"W6401": (
4846
"Using a deprecated @pytest.yield_fixture decorator",

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,11 @@ load-plugins= [
125125
"pylint.extensions.broad_try_clause",
126126
"pylint.extensions.check_elif",
127127
"pylint.extensions.code_style",
128-
"pylint.extensions.comparetozero",
129128
"pylint.extensions.comparison_placement",
130129
"pylint.extensions.confusing_elif",
131130
# "pylint.extensions.consider_ternary_expression", # Not a pretty refactoring
132131
"pylint.extensions.docparams",
133132
"pylint.extensions.docstyle",
134-
"pylint.extensions.emptystring",
135133
"pylint.extensions.eq_without_hash",
136134
"pylint.extensions.for_any_all",
137135
"pylint.extensions.mccabe",

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
long_description_content_type="text/markdown",
2929
packages=find_packages(exclude=["tests*", "sandbox"]),
3030
install_requires=[
31-
"pylint<3",
31+
"pylint<4",
3232
"pytest>=4.6",
3333
],
3434
python_requires=">=3.6",
@@ -45,6 +45,7 @@
4545
"Programming Language :: Python :: 3.9",
4646
"Programming Language :: Python :: 3.10",
4747
"Programming Language :: Python :: 3.11",
48+
"Programming Language :: Python :: 3.12",
4849
"Programming Language :: Python :: Implementation :: CPython",
4950
"Operating System :: OS Independent",
5051
"License :: OSI Approved :: MIT License",

tests/base_tester.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,11 @@ def setup_method(self):
7979
self.impacted_checkers = []
8080

8181
for key, value in self.CONFIG.items():
82-
setattr(self.checker.config, key, value)
82+
setattr(self.linter.config, key, value)
8383
self.checker.open()
8484

8585
for checker_class in self.IMPACTED_CHECKER_CLASSES:
8686
checker = checker_class(self.linter)
87-
for key, value in self.CONFIG.items():
88-
setattr(checker.config, key, value)
8987
checker.open()
9088
self.impacted_checkers.append(checker)
9189

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36,py37,py38,py39,py310,py311
2+
envlist = py{36,37,38,39,310,311,312}
33
skipsdist = True
44
passenv =
55
FORCE_COLOR

0 commit comments

Comments
 (0)