dycw-pre-commit-hooks 0.9.14__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.

Files changed (29) hide show
  1. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/.pre-commit-config.yaml +2 -2
  2. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/PKG-INFO +1 -1
  3. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/__init__.py +1 -1
  4. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/common.py +2 -8
  5. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_bump2version/__init__.py +1 -1
  6. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_dockfmt/__init__.py +3 -4
  7. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_hatch_version/__init__.py +1 -1
  8. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_ruff_format/__init__.py +1 -1
  9. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_uv_pip_compile/__init__.py +2 -2
  10. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pyproject.toml +13 -3
  11. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/requirements.txt +2 -2
  12. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/.envrc +0 -0
  13. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/.github/workflows/push.yml +0 -0
  14. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/.gitignore +0 -0
  15. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/.pre-commit-hooks.yaml +0 -0
  16. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/README.md +0 -0
  17. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/py.typed +0 -0
  18. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_bump2version/__main__.py +0 -0
  19. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_dockfmt/__main__.py +0 -0
  20. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_hatch_version/__main__.py +0 -0
  21. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_ruff_format/__main__.py +0 -0
  22. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/pre_commit_hooks/run_uv_pip_compile/__main__.py +0 -0
  23. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/tests/__init__.py +0 -0
  24. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/tests/test_main.py +0 -0
  25. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-bump2version.sh +0 -0
  26. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-dockfmt.sh +0 -0
  27. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-hatch-version.sh +0 -0
  28. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-ruff-format.sh +0 -0
  29. {dycw_pre_commit_hooks-0.9.14 → dycw_pre_commit_hooks-0.9.15}/try-repo/run-uv-pip-compile.sh +0 -0
@@ -1,12 +1,12 @@
1
1
  repos:
2
2
  # fixers
3
3
  - repo: https://github.com/astral-sh/ruff-pre-commit
4
- rev: v0.3.7
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.13
9
+ rev: 0.9.14
10
10
  hooks:
11
11
  - id: run-hatch-version
12
12
  - id: run-ruff-format
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dycw-pre-commit-hooks
3
- Version: 0.9.14
3
+ Version: 0.9.15
4
4
  Author-email: Derek Wan <d.wan@icloud.com>
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click<8.2,>=8.1.7
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.9.14"
3
+ __version__ = "0.9.15"
@@ -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) # noqa: S603
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
- ["dockfmt", "fmt", path.as_posix()], # noqa: S603, S607
40
- text=True,
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) # noqa: S603
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) # noqa: S603
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", # noqa: E501
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) # noqa: S603
61
+ _ = check_call(cmd)
62
62
  except CalledProcessError:
63
63
  logger.exception("Failed to run {cmd!r}", cmd=" ".join(cmd))
64
64
  raise
@@ -112,7 +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
115
123
  "PT013", # pytest-incorrect-pytest-import
124
+ "S101", # assert-used
125
+ "S603", # subprocess-without-shell-equals-true
126
+ "S607", # start-process-with-partial-path
116
127
  # formatter
117
128
  "W191", # tab-indentation
118
129
  "E111", # indentation-with-invalid-multiple
@@ -133,14 +144,13 @@ select = ["ALL"]
133
144
 
134
145
  [tool.ruff.lint.extend-per-file-ignores]
135
146
  "*.ipynb" = [
147
+ "B018", # useless-expression
136
148
  "F403", # undefined-local-with-import-star
137
149
  "F405", # undefined-local-with-import-star-usage
138
150
  "PLE1142", # await-outside-async
151
+ "S101", # assert-used
139
152
  ]
140
153
  "src/tests/**/*.py" = [
141
- "FBT001", # boolean-positional-arg-in-function-definition
142
- "FBT003", # boolean-positional-value-in-function-call
143
- "PLR2004", # magic-value-comparison
144
154
  "S101", # assert-used
145
155
  ]
146
156
 
@@ -19,7 +19,7 @@ distlib==0.3.8
19
19
  dycw-utilities==0.25.2
20
20
  editables==0.5
21
21
  # via hatchling
22
- exceptiongroup==1.2.0
22
+ exceptiongroup==1.2.1
23
23
  # via
24
24
  # anyio
25
25
  # dycw-utilities
@@ -55,7 +55,7 @@ jaraco-classes==3.4.0
55
55
  # via keyring
56
56
  jaraco-context==5.3.0
57
57
  # via keyring
58
- jaraco-functools==4.0.0
58
+ jaraco-functools==4.0.1
59
59
  # via keyring
60
60
  keyring==25.1.0
61
61
  # via hatch