Skip to content
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

Support for pylint 3 & python 3.12 #22

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CACHE_VERSION: 1
KEY_PREFIX: base-venv
DEFAULT_PYTHON: '3.11'
DEFAULT_PYTHON: '3.12'
PRE_COMMIT_CACHE: ~/.cache/pre-commit

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- published

env:
DEFAULT_PYTHON: '3.11'
DEFAULT_PYTHON: '3.12'

permissions:
contents: read
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,11 @@ jobs:
- windows-latest
- macos-latest
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
# - '3.12' # FixMe: https://github.com/pylint-dev/pylint-pytest/issues/3
# Python 3.6 is not available in `ubuntu-latest`.
exclude:
- python-version: '3.6'
os: ubuntu-latest
include:
- python-version: '3.6'
os: ubuntu-20.04
- '3.12'

defaults:
run:
Expand Down Expand Up @@ -61,7 +52,10 @@ jobs:
env:
FORCE_COLOR: 1
PYTEST_CI_ARGS: --cov-report=xml --cov-report=html --junitxml=test_artifacts/test_report.xml --color=yes
run: tox ${{ matrix.python-version == '3.6' && '--skip-missing-interpreters=true' || '' }}
run: |
TOX_ENV=$(echo "py${{ matrix.python-version }}" | tr -d .)
tox -e $TOX_ENV
shell: bash

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## [Unreleased]

### Added

- Support for Python 3.12 (#22)
- Support for Pylint 3 (#22)

### Removed

- Support for Python 3.6 & 3.7 (#22)

## [1.1.3] - 2023-10-23

This is the first release after maintenance was assumed by https://github.com/stdedos.
Expand Down
2 changes: 0 additions & 2 deletions pylint_pytest/checkers/class_attr_loader.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
from typing import Optional, Set

from astroid import Assign, Attribute, ClassDef, Name
from pylint.interfaces import IAstroidChecker

from ..utils import _can_use_fixture, _is_class_autouse_fixture
from . import BasePytestChecker


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

in_setup = False
Expand Down
2 changes: 0 additions & 2 deletions pylint_pytest/checkers/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import pylint
import pytest
from pylint.checkers.variables import VariablesChecker
from pylint.interfaces import IAstroidChecker

from ..utils import (
_can_use_fixture,
Expand Down Expand Up @@ -42,7 +41,6 @@ def pytest_collectreport(self, report):


class FixtureChecker(BasePytestChecker):
__implements__ = IAstroidChecker
msgs = {
"W6401": (
"Using a deprecated @pytest.yield_fixture decorator",
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ paths.source = [
]

[tool.mypy]
python_version = "3.7"
irtazaakram marked this conversation as resolved.
Show resolved Hide resolved
python_version = "3.8"
check_untyped_defs = true
explicit_package_bases = true
namespace_packages = true
Expand Down Expand Up @@ -89,8 +89,7 @@ ignore = [
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]

# py36, but ruff does not support it :/
target-version = "py37"
irtazaakram marked this conversation as resolved.
Show resolved Hide resolved
target-version = "py38"

[tool.ruff.pydocstyle]
convention = "google"
Expand All @@ -113,7 +112,7 @@ convention = "google"

[tool.pylint]

py-version = "3.6"
irtazaakram marked this conversation as resolved.
Show resolved Hide resolved
py-version = "3.8"

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

Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,22 @@
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tests*", "sandbox"]),
install_requires=[
"pylint<3",
"pylint",
"pytest>=4.6",
],
python_requires=">=3.6",
python_requires=">=3.8",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Quality Assurance",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38,py39,py310,py311
envlist = py{38,39,310,311,312}
skipsdist = True
passenv =
FORCE_COLOR
Expand Down
Loading