Skip to content
Open
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
# the work and the CodeScene upload for the same commit.
- name: Test and Measure Coverage
if: ${{ github.event_name == 'pull_request' }}
uses: leynos/shared-actions/.github/actions/generate-coverage@4d696e72fff6db49f34302ccf119ba978f1032c9
uses: leynos/shared-actions/.github/actions/generate-coverage@57a33fa65e329db7edc81ece661f1a2e1d39868f
with:
output-path: coverage.xml
format: cobertura
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:


- name: Generate coverage
uses: leynos/shared-actions/.github/actions/generate-coverage@4d696e72fff6db49f34302ccf119ba978f1032c9
uses: leynos/shared-actions/.github/actions/generate-coverage@57a33fa65e329db7edc81ece661f1a2e1d39868f
with:
output-path: coverage.xml
format: cobertura
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ______________________________________________________________________

## Features

Twelve pylint messages:
Thirteen pylint messages:

- `prefer-structural-pattern-matching` (R9101) — `isinstance` dispatch on
one subject should be a `match` statement with class patterns.
Expand All @@ -98,7 +98,9 @@ Twelve pylint messages:
- `prefer-snapshot-assertion` (R9108) and `prefer-snapshot-substring`
(R9109) — tests asserting against large inline literals or repeatedly probing
substrings should use a syrupy snapshot.
- `prefer-type-statement` (R9111) — module-level type aliases should use
- `prefer-slots-for-dataclass` (R9111) — closed standard-library dataclasses
should request generated slots or declare an explicit slot layout.
- `prefer-type-statement` (R9112) — module-level type aliases should use
the PEP 695 `type` statement on a 3.12+ baseline.
- `redundant-future-annotations` (C9112) — `from __future__ import annotations`
should be removed on a 3.14+ baseline, where deferred evaluation is the
Expand Down
11 changes: 8 additions & 3 deletions df12_python_lints/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""df12-python-lints: pylint checkers for df12 Python conventions.

The package is a pylint plugin. Loading it registers nine checkers
providing twelve messages:
The package is a pylint plugin. Loading it registers ten checkers
providing thirteen messages:

- ``prefer-structural-pattern-matching`` (R9101) flags ``isinstance``
dispatch chains better expressed as ``match`` statements;
Expand All @@ -22,7 +22,9 @@
- ``prefer-snapshot-assertion`` (R9108) with
``prefer-snapshot-substring`` (R9109) flag test assertions better
expressed as syrupy snapshots; and
- ``prefer-type-statement`` (R9111) flags module-level type aliases
- ``prefer-slots-for-dataclass`` (R9111) flags closed standard-library
dataclasses that do not request or declare slots;
- ``prefer-type-statement`` (R9112) flags module-level type aliases
better declared with the PEP 695 ``type`` statement, while
``redundant-future-annotations`` (C9112) flags ``from __future__
import annotations`` on a 3.14+ baseline; both respect pylint's
Expand All @@ -46,6 +48,7 @@

from .assert_messages import AssertMessageChecker
from .constant_chain import ConstantChainChecker
from .dataclass_slots import DataclassSlotsChecker
from .future_annotations import FutureAnnotationsChecker
from .match_dispatch import MatchDispatchChecker
from .reexports import ReexportAssignmentChecker
Expand All @@ -60,6 +63,7 @@
__all__ = [
"AssertMessageChecker",
"ConstantChainChecker",
"DataclassSlotsChecker",
"FutureAnnotationsChecker",
"MatchDispatchChecker",
"ReexportAssignmentChecker",
Expand All @@ -83,6 +87,7 @@ def register(linter: PyLinter) -> None:
linter.register_checker(MatchDispatchChecker(linter))
linter.register_checker(AssertMessageChecker(linter))
linter.register_checker(ConstantChainChecker(linter))
linter.register_checker(DataclassSlotsChecker(linter))
linter.register_checker(TrivialWrapperChecker(linter))
linter.register_checker(ReexportAssignmentChecker(linter))
linter.register_checker(SuppressionCommentChecker(linter))
Expand Down
Loading
Loading