Skip to content

Commit 901d316

Browse files
committed
feat: support for pylint & python 3.12
1 parent e73cc2f commit 901d316

File tree

9 files changed

+31
-25
lines changed

9 files changed

+31
-25
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
env:
1313
CACHE_VERSION: 1
1414
KEY_PREFIX: base-venv
15-
DEFAULT_PYTHON: '3.11'
15+
DEFAULT_PYTHON: '3.12'
1616
PRE_COMMIT_CACHE: ~/.cache/pre-commit
1717

1818
concurrency:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- published
88

99
env:
10-
DEFAULT_PYTHON: '3.11'
10+
DEFAULT_PYTHON: '3.12'
1111

1212
permissions:
1313
contents: read

.github/workflows/run-tests.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,22 @@ jobs:
2020
- windows-latest
2121
- macos-latest
2222
python-version:
23-
- '3.6'
24-
- '3.7'
2523
- '3.8'
2624
- '3.9'
2725
- '3.10'
2826
- '3.11'
29-
# - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3
30-
# Python 3.6 is not available in `ubuntu-latest`.
31-
exclude:
32-
- python-version: '3.6'
33-
os: ubuntu-latest
27+
- '3.12'
3428
include:
35-
- python-version: '3.6'
36-
os: ubuntu-20.04
29+
- python-version: '3.8'
30+
tox_env: py38
31+
- python-version: '3.9'
32+
tox_env: py39
33+
- python-version: '3.10'
34+
tox_env: py310
35+
- python-version: '3.11'
36+
tox_env: py311
37+
- python-version: '3.12'
38+
tox_env: py312
3739

3840
defaults:
3941
run:
@@ -61,7 +63,8 @@ jobs:
6163
env:
6264
FORCE_COLOR: 1
6365
PYTEST_CI_ARGS: --cov-report=xml --cov-report=html --junitxml=test_artifacts/test_report.xml --color=yes
64-
run: tox ${{ matrix.python-version == '3.6' && '--skip-missing-interpreters=true' || '' }}
66+
run: |
67+
tox -e ${{ matrix.tox_env }}
6568
6669
- name: Upload coverage reports to Codecov
6770
uses: codecov/codecov-action@v3

CHANGELOG.md

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

33
## [Unreleased]
44

5+
### Added
6+
7+
- Support for Python 3.12 (#22)
8+
- Support for Pylint 3 (#22)
9+
10+
### Removed
11+
12+
- Support for Python 3.6 & 3.7 (#22)
13+
514
## [1.1.3] - 2023-10-23
615

716
This is the first release after maintenance was assumed by https://github.com/stdedos.

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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ paths.source = [
3636
]
3737

3838
[tool.mypy]
39-
python_version = "3.7"
39+
python_version = "3.12"
4040
check_untyped_defs = true
4141
explicit_package_bases = true
4242
namespace_packages = true
@@ -89,8 +89,7 @@ ignore = [
8989
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
9090
]
9191

92-
# py36, but ruff does not support it :/
93-
target-version = "py37"
92+
target-version = "py312"
9493

9594
[tool.ruff.pydocstyle]
9695
convention = "google"
@@ -113,7 +112,7 @@ convention = "google"
113112

114113
[tool.pylint]
115114

116-
py-version = "3.6"
115+
py-version = "3.12"
117116

118117
ignore-paths="tests/input" # Ignore test inputs
119118

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,22 @@
2828
long_description_content_type="text/markdown",
2929
packages=find_packages(exclude=["tests*", "sandbox"]),
3030
install_requires=[
31-
"pylint<3",
31+
"pylint",
3232
"pytest>=4.6",
3333
],
34-
python_requires=">=3.6",
34+
python_requires=">=3.8",
3535
classifiers=[
3636
"Development Status :: 5 - Production/Stable",
3737
"Intended Audience :: Developers",
3838
"Topic :: Software Development :: Testing",
3939
"Topic :: Software Development :: Quality Assurance",
4040
"Programming Language :: Python",
4141
"Programming Language :: Python :: 3",
42-
"Programming Language :: Python :: 3.6",
43-
"Programming Language :: Python :: 3.7",
4442
"Programming Language :: Python :: 3.8",
4543
"Programming Language :: Python :: 3.9",
4644
"Programming Language :: Python :: 3.10",
4745
"Programming Language :: Python :: 3.11",
46+
"Programming Language :: Python :: 3.12",
4847
"Programming Language :: Python :: Implementation :: CPython",
4948
"Operating System :: OS Independent",
5049
"License :: OSI Approved :: MIT License",

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{38,39,310,311,312}
33
skipsdist = True
44
passenv =
55
FORCE_COLOR

0 commit comments

Comments
 (0)