dycw-pre-commit-hooks 0.9.13__tar.gz → 0.9.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dycw-pre-commit-hooks might be problematic. Click here for more details.
- dycw_pre_commit_hooks-0.9.15/.envrc +1 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/.pre-commit-config.yaml +4 -4
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/PKG-INFO +1 -1
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/__init__.py +1 -1
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/common.py +2 -8
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_bump2version/__init__.py +1 -1
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_dockfmt/__init__.py +3 -4
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_hatch_version/__init__.py +1 -1
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_ruff_format/__init__.py +1 -1
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_uv_pip_compile/__init__.py +2 -2
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pyproject.toml +19 -3
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/requirements.txt +15 -13
- dycw_pre_commit_hooks-0.9.13/.envrc +0 -1
- dycw_pre_commit_hooks-0.9.13/environment.yml +0 -5
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/.github/workflows/push.yml +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/.gitignore +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/.pre-commit-hooks.yaml +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/README.md +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/py.typed +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_bump2version/__main__.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_dockfmt/__main__.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_hatch_version/__main__.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_ruff_format/__main__.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_uv_pip_compile/__main__.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/tests/__init__.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/tests/test_main.py +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-bump2version.sh +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-dockfmt.sh +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-hatch-version.sh +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-ruff-format.sh +0 -0
- {dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-uv-pip-compile.sh +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
layout pyenv 3.10.14
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
repos:
|
|
2
2
|
# fixers
|
|
3
3
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
4
|
-
rev: v0.
|
|
4
|
+
rev: v0.4.0
|
|
5
5
|
hooks:
|
|
6
6
|
- id: ruff
|
|
7
7
|
args: [--fix]
|
|
8
8
|
- repo: https://github.com/dycw/pre-commit-hooks
|
|
9
|
-
rev: 0.9.
|
|
9
|
+
rev: 0.9.14
|
|
10
10
|
hooks:
|
|
11
11
|
- id: run-hatch-version
|
|
12
12
|
- id: run-ruff-format
|
|
13
13
|
- id: run-uv-pip-compile
|
|
14
14
|
args: [--python-version=3.10]
|
|
15
15
|
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
|
|
16
|
-
rev: v2.
|
|
16
|
+
rev: v2.13.0
|
|
17
17
|
hooks:
|
|
18
18
|
- id: pretty-format-toml
|
|
19
19
|
args: [--autofix, --trailing-commas]
|
|
@@ -22,7 +22,7 @@ repos:
|
|
|
22
22
|
hooks:
|
|
23
23
|
- id: prettier
|
|
24
24
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
25
|
-
rev: v4.
|
|
25
|
+
rev: v4.6.0
|
|
26
26
|
hooks:
|
|
27
27
|
- id: check-executables-have-shebangs
|
|
28
28
|
- id: check-merge-conflict
|
|
@@ -53,20 +53,14 @@ def _get_master_version(
|
|
|
53
53
|
name: Literal["run-bump2version", "run-hatch-version"],
|
|
54
54
|
) -> VersionInfo:
|
|
55
55
|
repo = md5(Path.cwd().as_posix().encode(), usedforsecurity=False).hexdigest()
|
|
56
|
-
commit = check_output(
|
|
57
|
-
["git", "rev-parse", "origin/master"], # noqa: S603, S607
|
|
58
|
-
text=True,
|
|
59
|
-
).rstrip("\n")
|
|
56
|
+
commit = check_output(["git", "rev-parse", "origin/master"], text=True).rstrip("\n")
|
|
60
57
|
cache = xdg_cache_home().joinpath("pre-commit-hooks", name, repo, commit)
|
|
61
58
|
try:
|
|
62
59
|
with cache.open() as fh:
|
|
63
60
|
return VersionInfo.parse(fh.read())
|
|
64
61
|
except FileNotFoundError:
|
|
65
62
|
cache.parent.mkdir(parents=True, exist_ok=True)
|
|
66
|
-
text = check_output(
|
|
67
|
-
["git", "show", f"{commit}:{path}"], # noqa: S603, S607
|
|
68
|
-
text=True,
|
|
69
|
-
)
|
|
63
|
+
text = check_output(["git", "show", f"{commit}:{path}"], text=True)
|
|
70
64
|
version = _parse_version(pattern, text)
|
|
71
65
|
with cache.open(mode="w") as fh:
|
|
72
66
|
_ = fh.write(str(version))
|
|
@@ -28,7 +28,7 @@ def _process(*, filename: Literal["setup.cfg", ".bumpversion.cfg"]) -> bool:
|
|
|
28
28
|
return True
|
|
29
29
|
cmd = ["bump2version", "--allow-dirty", f"--new-version={version}", "patch"]
|
|
30
30
|
try:
|
|
31
|
-
_ = check_call(cmd, stdout=PIPE, stderr=STDOUT)
|
|
31
|
+
_ = check_call(cmd, stdout=PIPE, stderr=STDOUT)
|
|
32
32
|
except CalledProcessError as error:
|
|
33
33
|
if error.returncode != 1:
|
|
34
34
|
logger.exception("Failed to run {cmd!r}", cmd=" ".join(cmd))
|
|
@@ -35,10 +35,9 @@ def _process(path: Path, /) -> bool:
|
|
|
35
35
|
with path.open() as fh:
|
|
36
36
|
current = fh.read()
|
|
37
37
|
strip = "\t\n"
|
|
38
|
-
proposed = check_output(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
).lstrip(strip)
|
|
38
|
+
proposed = check_output(["dockfmt", "fmt", path.as_posix()], text=True).lstrip(
|
|
39
|
+
strip
|
|
40
|
+
)
|
|
42
41
|
if current == proposed:
|
|
43
42
|
return True
|
|
44
43
|
with path.open(mode="w") as fh:
|
|
@@ -25,7 +25,7 @@ def _process() -> bool:
|
|
|
25
25
|
return True
|
|
26
26
|
cmd = ["hatch", "version", str(version)]
|
|
27
27
|
try:
|
|
28
|
-
_ = check_call(cmd, stdout=PIPE, stderr=STDOUT)
|
|
28
|
+
_ = check_call(cmd, stdout=PIPE, stderr=STDOUT)
|
|
29
29
|
except CalledProcessError as error:
|
|
30
30
|
if error.returncode != 1:
|
|
31
31
|
logger.exception("Failed to run {cmd!r}", cmd=" ".join(cmd))
|
|
@@ -76,7 +76,7 @@ def _get_modified_pyproject() -> TOMLDocument:
|
|
|
76
76
|
def _run_ruff_format() -> bool:
|
|
77
77
|
cmd = ["ruff", "format", "."]
|
|
78
78
|
try:
|
|
79
|
-
code = check_call(cmd)
|
|
79
|
+
code = check_call(cmd)
|
|
80
80
|
except CalledProcessError:
|
|
81
81
|
logger.exception("Failed to run {cmd!r}", cmd=" ".join(cmd))
|
|
82
82
|
raise
|
|
@@ -14,7 +14,7 @@ from pre_commit_hooks.common import REQUIREMENTS_TXT
|
|
|
14
14
|
@command()
|
|
15
15
|
@option(
|
|
16
16
|
"--python-version",
|
|
17
|
-
help="The minimum Python version that should be supported by the compiled requirements",
|
|
17
|
+
help="The minimum Python version that should be supported by the compiled requirements",
|
|
18
18
|
)
|
|
19
19
|
def main(*, python_version: str | None) -> bool:
|
|
20
20
|
"""CLI for the `run-uv-pip-compile` hook."""
|
|
@@ -58,7 +58,7 @@ def _run_uv_pip_compile(*, python_version: str | None) -> str:
|
|
|
58
58
|
]
|
|
59
59
|
)
|
|
60
60
|
try:
|
|
61
|
-
_ = check_call(cmd)
|
|
61
|
+
_ = check_call(cmd)
|
|
62
62
|
except CalledProcessError:
|
|
63
63
|
logger.exception("Failed to run {cmd!r}", cmd=" ".join(cmd))
|
|
64
64
|
raise
|
|
@@ -112,6 +112,18 @@ ignore = [
|
|
|
112
112
|
"ANN102", # missing-type-cls
|
|
113
113
|
"ANN401", # dynamically-typed-expression
|
|
114
114
|
"D", # pydocstyle
|
|
115
|
+
"E501", # line-too-long
|
|
116
|
+
"F403", # undefined-local-with-import-star
|
|
117
|
+
"F405", # undefined-local-with-import-star-usage
|
|
118
|
+
"PLE1142", # await-outside-async
|
|
119
|
+
"PLR0911", # too-many-return-statements
|
|
120
|
+
"PLR0913", # too-many-arguments
|
|
121
|
+
"PLR0915", # too-many-statements
|
|
122
|
+
"PLR2004", # magic-value-comparison
|
|
123
|
+
"PT013", # pytest-incorrect-pytest-import
|
|
124
|
+
"S101", # assert-used
|
|
125
|
+
"S603", # subprocess-without-shell-equals-true
|
|
126
|
+
"S607", # start-process-with-partial-path
|
|
115
127
|
# formatter
|
|
116
128
|
"W191", # tab-indentation
|
|
117
129
|
"E111", # indentation-with-invalid-multiple
|
|
@@ -131,10 +143,14 @@ ignore = [
|
|
|
131
143
|
select = ["ALL"]
|
|
132
144
|
|
|
133
145
|
[tool.ruff.lint.extend-per-file-ignores]
|
|
146
|
+
"*.ipynb" = [
|
|
147
|
+
"B018", # useless-expression
|
|
148
|
+
"F403", # undefined-local-with-import-star
|
|
149
|
+
"F405", # undefined-local-with-import-star-usage
|
|
150
|
+
"PLE1142", # await-outside-async
|
|
151
|
+
"S101", # assert-used
|
|
152
|
+
]
|
|
134
153
|
"src/tests/**/*.py" = [
|
|
135
|
-
"FBT001", # boolean-positional-arg-in-function-definition
|
|
136
|
-
"FBT003", # boolean-positional-value-in-function-call
|
|
137
|
-
"PLR2004", # magic-value-comparison
|
|
138
154
|
"S101", # assert-used
|
|
139
155
|
]
|
|
140
156
|
|
|
@@ -4,6 +4,8 @@ anyio==4.3.0
|
|
|
4
4
|
# via httpx
|
|
5
5
|
attrs==23.2.0
|
|
6
6
|
# via hypothesis
|
|
7
|
+
backports-tarfile==1.1.0
|
|
8
|
+
# via jaraco-context
|
|
7
9
|
certifi==2024.2.2
|
|
8
10
|
# via
|
|
9
11
|
# httpcore
|
|
@@ -17,30 +19,30 @@ distlib==0.3.8
|
|
|
17
19
|
dycw-utilities==0.25.2
|
|
18
20
|
editables==0.5
|
|
19
21
|
# via hatchling
|
|
20
|
-
exceptiongroup==1.2.
|
|
22
|
+
exceptiongroup==1.2.1
|
|
21
23
|
# via
|
|
22
24
|
# anyio
|
|
23
25
|
# dycw-utilities
|
|
24
26
|
# hypothesis
|
|
25
27
|
# pytest
|
|
26
|
-
execnet==2.
|
|
28
|
+
execnet==2.1.1
|
|
27
29
|
# via pytest-xdist
|
|
28
|
-
filelock==3.13.
|
|
30
|
+
filelock==3.13.4
|
|
29
31
|
# via virtualenv
|
|
30
32
|
h11==0.14.0
|
|
31
33
|
# via httpcore
|
|
32
34
|
hatch==1.9.4
|
|
33
35
|
hatchling==1.21.1
|
|
34
36
|
# via hatch
|
|
35
|
-
httpcore==1.0.
|
|
37
|
+
httpcore==1.0.5
|
|
36
38
|
# via httpx
|
|
37
39
|
httpx==0.27.0
|
|
38
40
|
# via hatch
|
|
39
41
|
hyperlink==21.0.0
|
|
40
42
|
# via hatch
|
|
41
|
-
hypothesis==6.
|
|
43
|
+
hypothesis==6.100.1
|
|
42
44
|
# via dycw-utilities
|
|
43
|
-
idna==3.
|
|
45
|
+
idna==3.7
|
|
44
46
|
# via
|
|
45
47
|
# anyio
|
|
46
48
|
# httpx
|
|
@@ -49,13 +51,13 @@ importlib-metadata==7.1.0
|
|
|
49
51
|
# via keyring
|
|
50
52
|
iniconfig==2.0.0
|
|
51
53
|
# via pytest
|
|
52
|
-
jaraco-classes==3.
|
|
54
|
+
jaraco-classes==3.4.0
|
|
53
55
|
# via keyring
|
|
54
|
-
jaraco-context==
|
|
56
|
+
jaraco-context==5.3.0
|
|
55
57
|
# via keyring
|
|
56
|
-
jaraco-functools==4.0.
|
|
58
|
+
jaraco-functools==4.0.1
|
|
57
59
|
# via keyring
|
|
58
|
-
keyring==25.
|
|
60
|
+
keyring==25.1.0
|
|
59
61
|
# via hatch
|
|
60
62
|
loguru==0.7.2
|
|
61
63
|
markdown-it-py==3.0.0
|
|
@@ -115,15 +117,15 @@ tomli-w==1.0.0
|
|
|
115
117
|
# via hatch
|
|
116
118
|
tomlkit==0.12.4
|
|
117
119
|
# via hatch
|
|
118
|
-
trove-classifiers==2024.
|
|
120
|
+
trove-classifiers==2024.4.10
|
|
119
121
|
# via hatchling
|
|
120
|
-
typing-extensions==4.
|
|
122
|
+
typing-extensions==4.11.0
|
|
121
123
|
# via
|
|
122
124
|
# anyio
|
|
123
125
|
# dycw-utilities
|
|
124
126
|
userpath==1.9.2
|
|
125
127
|
# via hatch
|
|
126
|
-
virtualenv==20.25.
|
|
128
|
+
virtualenv==20.25.3
|
|
127
129
|
# via hatch
|
|
128
130
|
xdg-base-dirs==6.0.1
|
|
129
131
|
zipp==3.18.1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
layout_anaconda
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dycw_pre_commit_hooks-0.9.13 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-uv-pip-compile.sh
RENAMED
|
File without changes
|