Skip to content

Commit 4267845

Browse files
authored
Merge pull request #51 from George-Ogden/mirror
Install Mirror|rorriM
2 parents c5f3d37 + 5fae2d0 commit 4267845

File tree

13 files changed

+125
-72
lines changed

13 files changed

+125
-72
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010

1111
jobs:
1212
lint:
13-
uses: George-Ogden/actions/.github/workflows/lint.yaml@v3.1.3
13+
uses: George-Ogden/actions/.github/workflows/lint.yaml@v3.2.0

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ permissions:
1111

1212
jobs:
1313
release:
14-
uses: George-Ogden/actions/.github/workflows/python-release.yaml@v3.1.3
14+
uses: George-Ogden/actions/.github/workflows/python-release.yaml@v3.2.0
1515
with:
1616
validation-code: "import mypy.version; from mypy_pytest_plugin import plugin; plugin(mypy.version.__version__)"

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414
matrix:
1515
shard: [0, 1, 2]
1616
total-shards: [3]
17-
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.1.3
17+
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.2.0
1818
with:
1919
python-versions: "['3.12', '3.13', '3.14']"
2020
timeout-minutes: 15
2121
pytest-flags: -vv mypy_pytest_plugin -n auto --shard-id=${{ matrix.shard }} --num-shards=${{ matrix.total-shards }}
2222

2323
integration_tests:
24-
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.1.3
24+
uses: George-Ogden/actions/.github/workflows/python-test.yaml@v3.2.0
2525
with:
2626
python-versions: "['3.12', '3.13', '3.14']"
2727
timeout-minutes: 10

.gitignore

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Specific Files
2+
tmp.py
3+
log.txt
4+
stdout.txt
5+
stderr.txt
6+
notes.txt
7+
TODO
8+
*.pseudo
9+
*.patch
10+
111
### Python ###
212
# Byte-compiled / optimized / DLL files
313
__pycache__/
@@ -172,19 +182,10 @@ pyrightconfig.json
172182

173183
### VisualStudioCode ###
174184
.vscode/*
175-
!.vscode/settings.json
176-
!.vscode/tasks.json
177-
!.vscode/launch.json
178-
!.vscode/extensions.json
179-
!.vscode/*.code-snippets
180185

181186
# Local History for Visual Studio Code
182-
.history/
187+
.history
188+
.ionide
183189

184190
# Built Visual Studio Code Extensions
185191
*.vsix
186-
187-
### VisualStudioCode Patch ###
188-
# Ignore all local history of files
189-
.history
190-
.ionide

.mirror.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# DANGER: EDIT AT YOUR OWN RISK. Track this file in version control so that others can sync files correctly.
2+
- commit: b63618f3e930009594b11b2e015e127f7dee99dc
3+
files:
4+
- .github/python-release.yaml
5+
- .github/python-test.yaml
6+
- .github/workflows/lint.yaml
7+
- LICENSE
8+
- mypy.ini
9+
- pyproject.toml
10+
- pytest.ini
11+
- python.gitignore
12+
- python.mirror.yaml
13+
- python.pre-commit-config.yaml
14+
- requirements-dev.txt
15+
- requirements.txt
16+
- ruff.toml
17+
- template-README.md
18+
- version.txt
19+
source: https://github.com/George-Ogden/mirror-config

.mirror.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- source: https://github.com/George-Ogden/mirror-config
3+
files:
4+
- .mirror.yaml: python.mirror.yaml
5+
- .github/workflows/release.yaml: .github/python-release.yaml
6+
- .github/workflows/test.yaml: .github/python-test.yaml
7+
- .github/workflows/lint.yaml
8+
- .gitignore: python.gitignore
9+
- .pre-commit-config.yaml: python.pre-commit-config.yaml
10+
- README.md: template-README.md
11+
- LICENSE
12+
- mypy.ini
13+
- pyproject.toml
14+
- pytest.ini
15+
- requirements-dev.txt
16+
- requirements.txt
17+
- ruff.toml
18+
- version.txt

.pre-commit-config.yaml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ default_stages: ["pre-commit"]
22
default_install_hook_types: ["pre-commit", "commit-msg"]
33

44
repos:
5-
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
- repo: https://github.com/George-Ogden/mirror-rorrim/
6+
rev: v0.4.1
7+
hooks:
8+
- id: mirror-check
9+
fail_fast: true
10+
11+
- repo: https://github.com/pre-commit/pre-commit-hooks/
612
rev: v6.0.0
713
hooks:
814
- id: end-of-file-fixer
@@ -11,33 +17,42 @@ repos:
1117
- id: requirements-txt-fixer
1218

1319
- repo: https://github.com/George-Ogden/linter/
14-
rev: v1.2.0
20+
rev: v1.2.1
1521
hooks:
1622
- id: lint
1723
args: [--fix]
1824

19-
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.14.4
25+
- repo: https://github.com/astral-sh/ruff-pre-commit/
26+
rev: v0.14.10
2127
hooks:
2228
- id: ruff-format
2329
- id: ruff-check
2430
args:
2531
- --fix
2632
exclude: ^test_samples/
2733

28-
- repo: https://github.com/pre-commit/mirrors-prettier
29-
rev: v3.1.0
34+
- repo: https://github.com/pre-commit/mirrors-prettier/
35+
rev: v4.0.0-alpha.8
3036
hooks:
3137
- id: prettier
3238
additional_dependencies: [prettier]
3339

34-
- repo: https://github.com/George-Ogden/pre-commit-hooks
35-
rev: v2.0.2
40+
- repo: https://github.com/rhysd/actionlint/
41+
rev: v1.7.9
42+
hooks:
43+
- id: actionlint
44+
45+
- repo: https://github.com/George-Ogden/pre-commit-hooks/
46+
rev: v2.0.4
3647
hooks:
3748
- id: check-merge-conflict
3849
- id: dbg-check
3950
- id: todo-check
51+
exclude: (?x)^(
52+
.pre-commit-config.yaml|
53+
.gitignore
54+
)$
4055
- id: mypy
4156
args: [-r, requirements-dev.txt, --show-traceback]
42-
exclude: ^test_samples/
57+
exclude: test_samples/
4358
- id: spell-check-commit-msgs

mypy.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[mypy]
2+
warn_unreachable = true
3+
disallow_subclassing_any = true
4+
disallow_incomplete_defs = true
5+
disallow_untyped_defs = true
6+
warn_unused_ignores = true
7+
warn_unused_configs = true
8+
strict_equality = true
9+
exclude_gitignore = true
10+
plugins = plugin.py, mypy.plugins.proper_plugin
11+
12+
[pytest_snapshot.*,xdist.*]
13+
ignore_missing_imports = true

pyproject.toml

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,17 @@ requires-python = ">=3.12,<3.15"
44
version = "2.1.1"
55
dynamic = ["dependencies"]
66

7-
[tool.setuptools]
8-
package-dir = {"mypy_pytest_plugin" = "mypy_pytest_plugin", "mypy_pytest_plugin_types-stubs" = "mypy_pytest_plugin_types"}
9-
10-
[tool.setuptools.package-data]
11-
"mypy_pytest_plugin_types" = ["*.pyi", "py.typed"]
12-
137
[tool.setuptools.dynamic]
148
dependencies = {file = ["requirements.txt"]}
9+
version = {file = ["version.txt"]}
1510

16-
[tool.ruff]
17-
line-length = 100
18-
19-
[tool.ruff.lint]
20-
extend-select = ["B", "E", "ERA", "F", "I", "N", "PT", "PYI", "RET", "RUF", "SIM", "UP", "W"]
21-
extend-ignore = ["E501", "F811", "PT011", "PT012", "PT013", "PYI041", "RET504", "SIM118"]
22-
exclude = ["test_samples/"]
23-
24-
[tool.ruff.lint.isort]
25-
force-sort-within-sections = true
11+
[tool.setuptools.package-dir]
12+
"mypy_pytest_plugin" = "mypy_pytest_plugin"
13+
"mypy_pytest_plugin_types-stubs" = "mypy_pytest_plugin_types"
2614

27-
[tool.ruff.format]
28-
quote-style = "double"
29-
indent-style = "space"
30-
31-
[tool.ruff.lint.flake8-pytest-style]
32-
parametrize-names-type = "csv"
33-
34-
[tool.mypy]
35-
warn_unreachable = true
36-
disallow_subclassing_any = true
37-
disallow_incomplete_defs = true
38-
disallow_untyped_defs = true
39-
warn_unused_ignores = true
40-
strict_equality = true
41-
exclude = "test_samples"
42-
plugins = ["plugin.py", "mypy.plugins.proper_plugin"]
43-
44-
[[tool.mypy.overrides]]
45-
module = "pytest_snapshot.*"
46-
ignore_missing_imports = true
47-
48-
[[tool.mypy.overrides]]
49-
module = "xdist.*"
50-
ignore_missing_imports = true
15+
[tool.setuptools.package-data]
16+
"mypy_pytest_plugin_types" = ["*.pyi", "py.typed"]
5117

52-
[tool.pytest.ini_options]
53-
python_files = "*_test.py"
54-
addopts = '--capture=sys --timeout 60 --timeout-method=thread'
55-
norecursedirs = ["test_samples"]
56-
pythonpath = ["."]
57-
markers = ["used_for_testing: used to verify config in mark attribute tests"]
18+
[build-system]
19+
requires = ["setuptools>=77"]
20+
build-backend = "setuptools.build_meta"

pytest.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[pytest]
2+
addopts = --capture=sys --timeout 60 --timeout-method=thread
3+
norecursedirs = test_samples
4+
pythonpath = .
5+
markers = used_for_testing: used to verify config in mark attribute tests

0 commit comments

Comments
 (0)