Skip to content
Merged
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/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:

jobs:
lint:
uses: George-Ogden/actions/.github/workflows/lint.yaml@v3.1.3
uses: George-Ogden/actions/.github/workflows/lint.yaml@v3.2.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ permissions:

jobs:
release:
uses: George-Ogden/actions/.github/workflows/python-release.yaml@v3.1.3
uses: George-Ogden/actions/.github/workflows/python-release.yaml@v3.2.0
with:
validation-code: "import mypy.version; from mypy_pytest_plugin import plugin; plugin(mypy.version.__version__)"
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
matrix:
shard: [0, 1, 2]
total-shards: [3]
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.1.3
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.2.0
with:
python-versions: "['3.12', '3.13', '3.14']"
timeout-minutes: 15
pytest-flags: -vv mypy_pytest_plugin -n auto --shard-id=${{ matrix.shard }} --num-shards=${{ matrix.total-shards }}

integration_tests:
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.1.3
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.2.0
with:
python-versions: "['3.12', '3.13', '3.14']"
timeout-minutes: 10
Expand Down
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Specific Files
tmp.py
log.txt
stdout.txt
stderr.txt
notes.txt
TODO
*.pseudo
*.patch

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -172,19 +182,10 @@ pyrightconfig.json

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/
.history
.ionide

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
19 changes: 19 additions & 0 deletions .mirror.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# DANGER: EDIT AT YOUR OWN RISK. Track this file in version control so that others can sync files correctly.
- commit: b63618f3e930009594b11b2e015e127f7dee99dc
files:
- .github/python-release.yaml
- .github/python-test.yaml
- .github/workflows/lint.yaml
- LICENSE
- mypy.ini
- pyproject.toml
- pytest.ini
- python.gitignore
- python.mirror.yaml
- python.pre-commit-config.yaml
- requirements-dev.txt
- requirements.txt
- ruff.toml
- template-README.md
- version.txt
source: https://github.com/George-Ogden/mirror-config
18 changes: 18 additions & 0 deletions .mirror.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
repos:
- source: https://github.com/George-Ogden/mirror-config
files:
- .mirror.yaml: python.mirror.yaml
- .github/workflows/release.yaml: .github/python-release.yaml
- .github/workflows/test.yaml: .github/python-test.yaml
- .github/workflows/lint.yaml
- .gitignore: python.gitignore
- .pre-commit-config.yaml: python.pre-commit-config.yaml
- README.md: template-README.md
- LICENSE
- mypy.ini
- pyproject.toml
- pytest.ini
- requirements-dev.txt
- requirements.txt
- ruff.toml
- version.txt
33 changes: 24 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ default_stages: ["pre-commit"]
default_install_hook_types: ["pre-commit", "commit-msg"]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/George-Ogden/mirror-rorrim/
rev: v0.4.1
hooks:
- id: mirror-check
fail_fast: true

- repo: https://github.com/pre-commit/pre-commit-hooks/
rev: v6.0.0
hooks:
- id: end-of-file-fixer
Expand All @@ -11,33 +17,42 @@ repos:
- id: requirements-txt-fixer

- repo: https://github.com/George-Ogden/linter/
rev: v1.2.0
rev: v1.2.1
hooks:
- id: lint
args: [--fix]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.4
- repo: https://github.com/astral-sh/ruff-pre-commit/
rev: v0.14.10
hooks:
- id: ruff-format
- id: ruff-check
args:
- --fix
exclude: ^test_samples/

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
- repo: https://github.com/pre-commit/mirrors-prettier/
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies: [prettier]

- repo: https://github.com/George-Ogden/pre-commit-hooks
rev: v2.0.2
- repo: https://github.com/rhysd/actionlint/
rev: v1.7.9
hooks:
- id: actionlint

- repo: https://github.com/George-Ogden/pre-commit-hooks/
rev: v2.0.4
hooks:
- id: check-merge-conflict
- id: dbg-check
- id: todo-check
exclude: (?x)^(
.pre-commit-config.yaml|
.gitignore
)$
- id: mypy
args: [-r, requirements-dev.txt, --show-traceback]
exclude: ^test_samples/
exclude: test_samples/
- id: spell-check-commit-msgs
13 changes: 13 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[mypy]
warn_unreachable = true
disallow_subclassing_any = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = true
warn_unused_configs = true
strict_equality = true
exclude_gitignore = true
plugins = plugin.py, mypy.plugins.proper_plugin

[pytest_snapshot.*,xdist.*]
ignore_missing_imports = true
55 changes: 9 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,17 @@ requires-python = ">=3.12,<3.15"
version = "2.1.1"
dynamic = ["dependencies"]

[tool.setuptools]
package-dir = {"mypy_pytest_plugin" = "mypy_pytest_plugin", "mypy_pytest_plugin_types-stubs" = "mypy_pytest_plugin_types"}

[tool.setuptools.package-data]
"mypy_pytest_plugin_types" = ["*.pyi", "py.typed"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
version = {file = ["version.txt"]}

[tool.ruff]
line-length = 100

[tool.ruff.lint]
extend-select = ["B", "E", "ERA", "F", "I", "N", "PT", "PYI", "RET", "RUF", "SIM", "UP", "W"]
extend-ignore = ["E501", "F811", "PT011", "PT012", "PT013", "PYI041", "RET504", "SIM118"]
exclude = ["test_samples/"]

[tool.ruff.lint.isort]
force-sort-within-sections = true
[tool.setuptools.package-dir]
"mypy_pytest_plugin" = "mypy_pytest_plugin"
"mypy_pytest_plugin_types-stubs" = "mypy_pytest_plugin_types"

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "csv"

[tool.mypy]
warn_unreachable = true
disallow_subclassing_any = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
warn_unused_ignores = true
strict_equality = true
exclude = "test_samples"
plugins = ["plugin.py", "mypy.plugins.proper_plugin"]

[[tool.mypy.overrides]]
module = "pytest_snapshot.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "xdist.*"
ignore_missing_imports = true
[tool.setuptools.package-data]
"mypy_pytest_plugin_types" = ["*.pyi", "py.typed"]

[tool.pytest.ini_options]
python_files = "*_test.py"
addopts = '--capture=sys --timeout 60 --timeout-method=thread'
norecursedirs = ["test_samples"]
pythonpath = ["."]
markers = ["used_for_testing: used to verify config in mark attribute tests"]
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
5 changes: 5 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[pytest]
addopts = --capture=sys --timeout 60 --timeout-method=thread
norecursedirs = test_samples
pythonpath = .
markers = used_for_testing: used to verify config in mark attribute tests
5 changes: 3 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
-r requirements.txt
dbg
debug @ git+https://github.com/George-Ogden/dbg@v2.3.1
git+https://github.com/George-Ogden/dbg
git+https://github.com/George-Ogden/mirror-rorrim
git+https://github.com/George-Ogden/pytest-dbg
inline-snapshot
pip
pre-commit
pytest-dbg @ git+https://github.com/George-Ogden/pytest-dbg@v2.3.1
pytest-shard
pytest-snapshot
pytest-timeout
Expand Down
17 changes: 17 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
line-length = 100

[format]
quote-style = "double"
indent-style = "space"

[lint]
exclude = ["test_samples/"]
extend-select = ["B", "E", "ERA", "F", "I", "N", "PT", "PYI", "RET", "RUF", "SIM", "UP", "W"]
extend-ignore = ["E501", "F811", "PT011", "PT012", "PT013", "PYI041", "RET504", "SIM118"]
extend-unfixable = ["B905"]

[lint.isort]
force-sort-within-sections = true

[lint.flake8-pytest-style]
parametrize-names-type = "csv"
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.1