dycw-pre-commit-hooks 0.13.10__tar.gz → 0.13.23__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 (30) hide show
  1. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/PKG-INFO +14 -13
  2. dycw_pre_commit_hooks-0.13.23/pyproject.toml +195 -0
  3. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/__init__.py +1 -1
  4. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/check_version_bumped/__init__.py +2 -0
  5. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/check_version_bumped/check-version-bumped +1 -1
  6. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/common.py +2 -2
  7. dycw_pre_commit_hooks-0.13.10/.gitignore +0 -166
  8. dycw_pre_commit_hooks-0.13.10/pyproject.toml +0 -218
  9. dycw_pre_commit_hooks-0.13.10/src/tests/__init__.py +0 -0
  10. dycw_pre_commit_hooks-0.13.10/src/tests/format_requirements/__init__.py +0 -0
  11. dycw_pre_commit_hooks-0.13.10/src/tests/format_requirements/in.toml +0 -30
  12. dycw_pre_commit_hooks-0.13.10/src/tests/format_requirements/out.toml +0 -30
  13. dycw_pre_commit_hooks-0.13.10/src/tests/format_requirements/test_format_requirements.py +0 -15
  14. dycw_pre_commit_hooks-0.13.10/src/tests/test_main.py +0 -7
  15. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/README.md +0 -0
  16. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/check_submodules_updated/__init__.py +0 -0
  17. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/check_submodules_updated/__main__.py +0 -0
  18. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/check_submodules_updated/check-submodules-updated +0 -0
  19. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/check_version_bumped/__main__.py +0 -0
  20. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/format_requirements/__init__.py +0 -0
  21. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/format_requirements/__main__.py +0 -0
  22. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/mirror_files/__init__.py +0 -0
  23. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/mirror_files/__main__.py +0 -0
  24. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/py.typed +0 -0
  25. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/replace_sequence_str/__init__.py +0 -0
  26. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/replace_sequence_str/__main__.py +0 -0
  27. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/run_bump_my_version/__init__.py +0 -0
  28. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/run_bump_my_version/__main__.py +0 -0
  29. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/tag_commits/__init__.py +0 -0
  30. {dycw_pre_commit_hooks-0.13.10 → dycw_pre_commit_hooks-0.13.23}/src/pre_commit_hooks/tag_commits/__main__.py +0 -0
@@ -1,18 +1,19 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.3
2
2
  Name: dycw-pre-commit-hooks
3
- Version: 0.13.10
3
+ Version: 0.13.23
4
+ Author: Derek Wan
4
5
  Author-email: Derek Wan <d.wan@icloud.com>
5
- Requires-Python: >=3.12
6
- Requires-Dist: click<8.4,>=8.3.0
7
- Requires-Dist: dycw-utilities<0.169,>=0.168.8
8
- Requires-Dist: gitpython<3.2,>=3.1.45
9
- Requires-Dist: libcst<1.9,>=1.8.5
10
- Requires-Dist: loguru<0.8,>=0.7.3
11
- Requires-Dist: more-itertools<10.9,>=10.8.0
12
- Requires-Dist: orjson<3.12,>=3.11.3
13
- Requires-Dist: packaging<25.1,>=25.0
14
- Requires-Dist: tomlkit<0.14,>=0.13.3
15
- Requires-Dist: xdg-base-dirs<6.1,>=6.0.2
6
+ Requires-Dist: click>=8.3.0,<8.4
7
+ Requires-Dist: dycw-utilities>=0.168.9,<0.169
8
+ Requires-Dist: gitpython>=3.1.45,<3.2
9
+ Requires-Dist: libcst>=1.8.5,<1.9
10
+ Requires-Dist: loguru>=0.7.3,<0.8
11
+ Requires-Dist: more-itertools>=10.8.0,<10.9
12
+ Requires-Dist: orjson>=3.11.3,<3.12
13
+ Requires-Dist: packaging>=25.0,<25.1
14
+ Requires-Dist: tomlkit>=0.13.3,<0.14
15
+ Requires-Dist: xdg-base-dirs>=6.0.2,<6.1
16
+ Requires-Python: >=3.13
16
17
  Description-Content-Type: text/markdown
17
18
 
18
19
  # pre-commit-hooks
@@ -0,0 +1,195 @@
1
+ # build-system
2
+ [build-system]
3
+ build-backend = "uv_build"
4
+ requires = ["uv_build"]
5
+
6
+ # dependency groups
7
+ [dependency-groups]
8
+ dev = ["dycw-utilities[test]", "pyright[nodejs]", "rich"]
9
+
10
+ # project
11
+ [project]
12
+ authors = [{ email = "d.wan@icloud.com", name = "Derek Wan" }]
13
+ dependencies = [
14
+ "click >=8.3.0, <8.4",
15
+ "dycw-utilities >=0.168.9, <0.169",
16
+ "gitpython >=3.1.45, <3.2",
17
+ "libcst >=1.8.5, <1.9",
18
+ "loguru >=0.7.3, <0.8",
19
+ "more-itertools >=10.8.0, <10.9",
20
+ "orjson >=3.11.3, <3.12",
21
+ "packaging >=25.0, <25.1",
22
+ "tomlkit >=0.13.3, <0.14",
23
+ "xdg-base-dirs >=6.0.2, <6.1",
24
+ ]
25
+ name = "dycw-pre-commit-hooks"
26
+ readme = "README.md"
27
+ requires-python = ">= 3.13"
28
+ version = "0.13.23"
29
+
30
+ [project.scripts]
31
+ check-submodules-updated = "pre_commit_hooks.check_submodules_updated:main"
32
+ check-version-bumped = "pre_commit_hooks.check_version_bumped:main"
33
+ format-requirements = "pre_commit_hooks.format_requirements:main"
34
+ mirror-files = "pre_commit_hooks.mirror_files:main"
35
+ replace-sequence-str = "pre_commit_hooks.replace_sequence_str:main"
36
+ run-bump-my-version = "pre_commit_hooks.run_bump_my_version:main"
37
+ tag-commits = "pre_commit_hooks.tag_commits:main"
38
+
39
+ # tool
40
+ [tool]
41
+
42
+ # bump-my-version
43
+ [tool.bumpversion]
44
+ allow_dirty = true
45
+ current_version = "0.13.23"
46
+
47
+ [[tool.bumpversion.files]]
48
+ filename = "src/pre_commit_hooks/__init__.py"
49
+ replace = "__version__ = \"{new_version}\""
50
+ search = "__version__ = \"{current_version}\""
51
+
52
+ # coverage
53
+ [tool.coverage]
54
+ [tool.coverage.html]
55
+ directory = ".coverage/html"
56
+
57
+ [tool.coverage.report]
58
+ exclude_also = ["@overload", "if TYPE_CHECKING:"]
59
+ fail_under = 100.0
60
+ skip_covered = true
61
+ skip_empty = true
62
+
63
+ [tool.coverage.run]
64
+ branch = true
65
+ data_file = ".coverage/data"
66
+ parallel = true
67
+
68
+ # nitpick
69
+ [tool.nitpick]
70
+ style = [
71
+ "https://raw.githubusercontent.com/dycw/nitpick/master/styles/3.13.toml",
72
+ "https://raw.githubusercontent.com/dycw/nitpick/master/styles/common.toml",
73
+ ]
74
+
75
+ # pyright
76
+ [tool.pyright]
77
+ deprecateTypingAliases = true
78
+ enableReachabilityAnalysis = false
79
+ ignore = ["**/_typeshed/**"]
80
+ pythonVersion = "3.13"
81
+ reportAny = false
82
+ reportCallInDefaultInitializer = true
83
+ reportImplicitOverride = true
84
+ reportImplicitStringConcatenation = true
85
+ reportImportCycles = true
86
+ reportMissingSuperCall = true
87
+ reportMissingTypeArgument = false
88
+ reportMissingTypeStubs = false
89
+ reportPrivateUsage = false
90
+ reportPropertyTypeMismatch = true
91
+ reportShadowedImports = true
92
+ reportUninitializedInstanceVariable = true
93
+ reportUnknownArgumentType = false
94
+ reportUnknownMemberType = false
95
+ reportUnknownParameterType = false
96
+ reportUnknownVariableType = false
97
+ reportUnnecessaryComparison = false
98
+ reportUnnecessaryTypeIgnoreComment = true
99
+ reportUnusedCallResult = true
100
+ reportUnusedImport = false
101
+ reportUnusedVariable = false
102
+ typeCheckingMode = "strict"
103
+
104
+ # pytest
105
+ [tool.pytest]
106
+ [tool.pytest.ini_options]
107
+ addopts = ["--color=auto", "--strict-markers", "-ra", "-vv"]
108
+ asyncio_default_fixture_loop_scope = "function"
109
+ asyncio_mode = "auto"
110
+ collect_imported_tests = false
111
+ filterwarnings = ["error"]
112
+ minversion = "8.0"
113
+ testpaths = ["src/tests"]
114
+ xfail_strict = true
115
+
116
+
117
+ # ruff
118
+ [tool.ruff]
119
+ src = ["src"]
120
+ target-version = "py313"
121
+ unsafe-fixes = true
122
+
123
+ [tool.ruff.format]
124
+ preview = true
125
+ skip-magic-trailing-comma = true
126
+
127
+ [tool.ruff.lint]
128
+ explicit-preview-rules = true
129
+ fixable = ["ALL"]
130
+ ignore = [
131
+ "ANN401", # any-type
132
+ "ASYNC109", # async-function-with-timeout
133
+ "C901", # complex-structure
134
+ "CPY", # flake8-copyright
135
+ "D", # pydocstyle
136
+ "DOC", # pydoclint
137
+ "E501", # line-too-long
138
+ "PD", # pandas-vet
139
+ "PERF203", # try-except-in-loop
140
+ "PLC0415", # import-outside-top-level
141
+ "PLR0911", # too-many-return-statements
142
+ "PLR0912", # too-many-branches
143
+ "PLR0913", # too-many-arguments
144
+ "PLR0915", # too-many-statements
145
+ "PLR2004", # magic-value-comparison
146
+ "PT012", # pytest-raises-with-multiple-statements
147
+ "PT013", # pytest-incorrect-pytest-import
148
+ "S202", # tarfile-unsafe-members
149
+ "S310", # suspicious-url-open-usage
150
+ "S311", # suspicious-non-cryptographic-random-usage
151
+ "S602", # subprocess-popen-with-shell-equals-true
152
+ "S603", # subprocess-without-shell-equals-true
153
+ "S607", # start-process-with-partial-path
154
+ # preview
155
+ "S101", # assert
156
+ # formatter
157
+ "COM812", # missing-trailing-comma
158
+ "COM819", # prohibited-trailing-comma
159
+ "E111", # indentation-with-invalid-multiple
160
+ "E114", # indentation-with-invalid-multiple-comment
161
+ "E117", # over-indented
162
+ "ISC001", # single-line-implicit-string-concatenation
163
+ "ISC002", # multi-line-implicit-string-concatenation
164
+ "W191", # tab-indentation
165
+ ]
166
+ preview = true
167
+ select = [
168
+ "ALL",
169
+ "RUF022", # unsorted-dunder-all
170
+ ]
171
+
172
+ [tool.ruff.lint.extend-per-file-ignores]
173
+ "*.ipynb" = [
174
+ "B018", # useless-expression
175
+ "F403", # undefined-local-with-import-star
176
+ "F405", # undefined-local-with-import-star-usage
177
+ "PLE1142", # await-outside-async
178
+ "S101", # assert-used
179
+ ]
180
+ "src/tests/**/*.py" = [
181
+ "S101", # assert-used
182
+ ]
183
+
184
+ [tool.ruff.lint.flake8-tidy-imports]
185
+ ban-relative-imports = "all"
186
+
187
+ [tool.ruff.lint.isort]
188
+ required-imports = ["from __future__ import annotations"]
189
+ split-on-trailing-comma = false
190
+
191
+ # uv
192
+ [tool.uv]
193
+ [tool.uv.build-backend]
194
+ module-name = "pre_commit_hooks"
195
+ module-root = "src"
@@ -1,3 +1,3 @@
1
1
  from __future__ import annotations
2
2
 
3
- __version__ = "0.13.10"
3
+ __version__ = "0.13.23"
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from importlib.resources import files
4
+ from stat import S_IXUSR
4
5
  from subprocess import SubprocessError, run
5
6
  from typing import TYPE_CHECKING, cast
6
7
 
@@ -22,6 +23,7 @@ def _process() -> bool:
22
23
  file = cast("Path", files("pre_commit_hooks")).joinpath(
23
24
  "check_version_bumped", "check-version-bumped"
24
25
  )
26
+ file.chmod(file.stat().st_mode | S_IXUSR)
25
27
  try:
26
28
  _ = run([str(file)], check=True)
27
29
  except SubprocessError:
@@ -34,7 +34,7 @@ main() {
34
34
  echo_date "'bump-my-version' or 'pip' must be available" >&2 && return 1
35
35
  fi
36
36
  if ! have_bump_my_version && have_command pip; then
37
- pip install bump-my-version
37
+ pip install bump-my-version 'click >=8.2.1, <8.3'
38
38
  fi
39
39
  if ! have_bump_my_version; then
40
40
  echo_date "'bump-my-version' must be available" >&2 && return 1
@@ -69,7 +69,7 @@ def get_version(source: Mode | Path | str | bytes | TOMLDocument, /) -> Version:
69
69
  msg = f"`version` is not a string; got {get_class_name(version)!r}"
70
70
  raise GetVersionError(msg)
71
71
  return parse_version(version)
72
- case never: # pyright: ignore[reportUnnecessaryComparison]
72
+ case never:
73
73
  assert_never(never)
74
74
 
75
75
 
@@ -83,7 +83,7 @@ def get_toml_path(mode: Mode = DEFAULT_MODE, /) -> Path:
83
83
  return Path("pyproject.toml")
84
84
  case "bumpversion":
85
85
  return Path(".bumpversion.toml")
86
- case never: # pyright: ignore[reportUnnecessaryComparison]
86
+ case never:
87
87
  assert_never(never)
88
88
 
89
89
 
@@ -1,166 +0,0 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[cod]
4
- *$py.class
5
-
6
- # C extensions
7
- *.so
8
-
9
- # Distribution / packaging
10
- .Python
11
- build/
12
- develop-eggs/
13
- dist/
14
- downloads/
15
- eggs/
16
- .eggs/
17
- lib/
18
- lib64/
19
- parts/
20
- sdist/
21
- var/
22
- wheels/
23
- share/python-wheels/
24
- *.egg-info/
25
- .installed.cfg
26
- *.egg
27
- MANIFEST
28
-
29
- # PyInstaller
30
- # Usually these files are written by a python script from a template
31
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
- *.manifest
33
- *.spec
34
-
35
- # Installer logs
36
- pip-log.txt
37
- pip-delete-this-directory.txt
38
-
39
- # Unit test / coverage reports
40
- htmlcov/
41
- .tox/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py,cover
50
- .hypothesis/
51
- .pytest_cache/
52
- cover/
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Django stuff:
59
- *.log
60
- local_settings.py
61
- db.sqlite3
62
- db.sqlite3-journal
63
-
64
- # Flask stuff:
65
- instance/
66
- .webassets-cache
67
-
68
- # Scrapy stuff:
69
- .scrapy
70
-
71
- # Sphinx documentation
72
- docs/_build/
73
-
74
- # PyBuilder
75
- .pybuilder/
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- # For a library or package, you might want to ignore these files since the code is
87
- # intended to run in multiple environments; otherwise, check them in:
88
- # .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- #Pipfile.lock
96
-
97
- # poetry
98
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
- #poetry.lock
103
-
104
- # pdm
105
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
- #pdm.lock
107
- # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
- # in version control.
109
- # https://pdm.fming.dev/#use-with-ide
110
- .pdm.toml
111
-
112
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
- __pypackages__/
114
-
115
- # Celery stuff
116
- celerybeat-schedule
117
- celerybeat.pid
118
-
119
- # SageMath parsed files
120
- *.sage.py
121
-
122
- # Environments
123
- .env
124
- .venv
125
- env/
126
- venv/
127
- ENV/
128
- env.bak/
129
- venv.bak/
130
-
131
- # Spyder project settings
132
- .spyderproject
133
- .spyproject
134
-
135
- # Rope project settings
136
- .ropeproject
137
-
138
- # mkdocs documentation
139
- /site
140
-
141
- # mypy
142
- .mypy_cache/
143
- .dmypy.json
144
- dmypy.json
145
-
146
- # Pyre type checker
147
- .pyre/
148
-
149
- # pytype static type analyzer
150
- .pytype/
151
-
152
- # Cython debug symbols
153
- cython_debug/
154
-
155
- # PyCharm
156
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
- # and can be added to the global gitignore or merged into this file. For a more nuclear
159
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
- #.idea/
161
-
162
- # extra
163
- .direnv/
164
- .ruff_cache/
165
- node_modules/
166
- Untitled.ipynb
@@ -1,218 +0,0 @@
1
- #
2
-
3
- # build-system
4
- [build-system]
5
- build-backend = "hatchling.build"
6
- requires = ["hatchling"]
7
-
8
- # dependency groups
9
- [dependency-groups]
10
- dev = [
11
- "dycw-utilities[test]",
12
- "pyright[nodejs]",
13
- "rich",
14
- ]
15
-
16
- # project
17
- [project]
18
- authors = [{name = "Derek Wan", email = "d.wan@icloud.com"}]
19
- dependencies = [
20
- "click >=8.3.0, <8.4",
21
- "dycw-utilities >=0.168.8, <0.169",
22
- "gitpython >=3.1.45, <3.2",
23
- "libcst >=1.8.5, <1.9",
24
- "loguru >=0.7.3, <0.8",
25
- "more-itertools >=10.8.0, <10.9",
26
- "orjson >=3.11.3, <3.12",
27
- "packaging >=25.0, <25.1",
28
- "tomlkit >=0.13.3, <0.14",
29
- "xdg-base-dirs >=6.0.2, <6.1",
30
- ]
31
- name = "dycw-pre-commit-hooks"
32
- readme = "README.md"
33
- requires-python = ">= 3.12"
34
- version = "0.13.10"
35
-
36
- [project.scripts]
37
- check-submodules-updated = "pre_commit_hooks.check_submodules_updated:main"
38
- check-version-bumped = "pre_commit_hooks.check_version_bumped:main"
39
- format-requirements = "pre_commit_hooks.format_requirements:main"
40
- mirror-files = "pre_commit_hooks.mirror_files:main"
41
- replace-sequence-str = "pre_commit_hooks.replace_sequence_str:main"
42
- run-bump-my-version = "pre_commit_hooks.run_bump_my_version:main"
43
- tag-commits = "pre_commit_hooks.tag_commits:main"
44
-
45
- # bump-my-version
46
- [tool.bumpversion]
47
- allow_dirty = true
48
- current_version = "0.13.10"
49
-
50
- [[tool.bumpversion.files]]
51
- filename = "src/pre_commit_hooks/__init__.py"
52
- replace = "__version__ = \"{new_version}\""
53
- search = "__version__ = \"{current_version}\""
54
-
55
- # coverage
56
- [tool.coverage]
57
-
58
- [tool.coverage.html]
59
- directory = ".coverage/html"
60
-
61
- [tool.coverage.report]
62
- exclude_also = ["@overload", "if TYPE_CHECKING:"]
63
- fail_under = 100.0
64
- skip_covered = true
65
- skip_empty = true
66
-
67
- [tool.coverage.run]
68
- branch = true
69
- data_file = ".coverage/data"
70
- parallel = true
71
-
72
- # hatch
73
- [tool.hatch]
74
-
75
- [tool.hatch.build.targets.sdist]
76
- include = ["src"]
77
-
78
- [tool.hatch.build.targets.wheel]
79
- packages = ["src/pre_commit_hooks"]
80
-
81
- # nitpick
82
- [tool.nitpick]
83
- style = [
84
- "https://raw.githubusercontent.com/dycw/nitpick/master/styles/3.12.toml",
85
- "https://raw.githubusercontent.com/dycw/nitpick/master/styles/common.toml",
86
- ]
87
-
88
- # pyright
89
- [tool.pyright]
90
- deprecateTypingAliases = true
91
- enableReachabilityAnalysis = false
92
- ignore = ["**/_typeshed/**"]
93
- pythonVersion = "3.12"
94
- reportAny = false
95
- reportCallInDefaultInitializer = true
96
- reportImplicitOverride = true
97
- reportImplicitStringConcatenation = true
98
- reportImportCycles = true
99
- reportMissingSuperCall = true
100
- reportMissingTypeArgument = false
101
- reportMissingTypeStubs = false
102
- reportPrivateUsage = false
103
- reportPropertyTypeMismatch = true
104
- reportShadowedImports = true
105
- reportUninitializedInstanceVariable = true
106
- reportUnknownArgumentType = false
107
- reportUnknownMemberType = false
108
- reportUnknownParameterType = false
109
- reportUnknownVariableType = false
110
- reportUnnecessaryTypeIgnoreComment = true
111
- reportUnusedCallResult = true
112
- reportUnusedImport = false
113
- reportUnusedVariable = false
114
- typeCheckingMode = "strict"
115
-
116
- # pytest
117
- [tool.pytest]
118
-
119
- [tool.pytest.ini_options]
120
- addopts = [
121
- "-ra",
122
- "-vv",
123
- "--color=auto",
124
- "--pdbcls=pudb.debugger:Debugger",
125
- "--strict-markers",
126
- ]
127
- asyncio_default_fixture_loop_scope = "function"
128
- asyncio_mode = "auto"
129
- collect_imported_tests = false
130
- filterwarnings = ["error"]
131
- minversion = "8.0"
132
- testpaths = ["src/tests"]
133
- xfail_strict = true
134
-
135
- # ruff
136
- [tool.ruff]
137
- src = ["src"]
138
- target-version = "py312"
139
- unsafe-fixes = true
140
-
141
- [tool.ruff.format]
142
- preview = true
143
- skip-magic-trailing-comma = true
144
-
145
- [tool.ruff.lint]
146
- explicit-preview-rules = true
147
- fixable = ["ALL"]
148
- ignore = [
149
- "ANN401", # any-type
150
- "ASYNC109", # async-function-with-timeout
151
- "C901", # complex-structure
152
- "D100", # undocumented-public-module
153
- "D101", # undocumented-public-class
154
- "D102", # undocumented-public-method
155
- "D103", # undocumented-public-function
156
- "D104", # undocumented-public-package
157
- "D105", # undocumented-magic-method
158
- "D106", # undocumented-public-nested-class
159
- "D107", # undocumented-public-init
160
- "D203", # one-blank-line-before-class
161
- "D213", # multi-line-summary-second-line
162
- "DOC", # pydoclint
163
- "E501", # line-too-long
164
- "PD", # pandas-vet
165
- "PERF203", # try-except-in-loop
166
- "PLC0415", # import-outside-top-level
167
- "PLR0911", # too-many-return-statements
168
- "PLR0912", # too-many-branches
169
- "PLR0913", # too-many-arguments
170
- "PLR0915", # too-many-statements
171
- "PLR2004", # magic-value-comparison
172
- "PT012", # pytest-raises-with-multiple-statements
173
- "PT013", # pytest-incorrect-pytest-import
174
- "S311", # suspicious-non-cryptographic-random-usage
175
- "S603", # subprocess-without-shell-equals-true
176
- "S607", # start-process-with-partial-path
177
- # preview
178
- "S101", # assert
179
- # formatter
180
- "W191", # tab-indentation
181
- "E111", # indentation-with-invalid-multiple
182
- "E114", # indentation-with-invalid-multiple-comment
183
- "E117", # over-indented
184
- "D206", # indent-with-spaces
185
- "D300", # triple-single-quotes
186
- "Q000", # bad-quotes-inline-string
187
- "Q001", # bad-quotes-multiline-string
188
- "Q002", # bad-quotes-docstring
189
- "Q003", # avoidable-escaped-quote
190
- "COM812", # missing-trailing-comma
191
- "COM819", # prohibited-trailing-comma
192
- "ISC001", # single-line-implicit-string-concatenation
193
- "ISC002", # multi-line-implicit-string-concatenation
194
- ]
195
- preview = true
196
- select = [
197
- "ALL",
198
- "RUF022", # unsorted-dunder-all
199
- ]
200
-
201
- [tool.ruff.lint.extend-per-file-ignores]
202
- "*.ipynb" = [
203
- "B018", # useless-expression
204
- "F403", # undefined-local-with-import-star
205
- "F405", # undefined-local-with-import-star-usage
206
- "PLE1142", # await-outside-async
207
- "S101", # assert-used
208
- ]
209
- "src/tests/**/*.py" = [
210
- "S101", # assert-used
211
- ]
212
-
213
- [tool.ruff.lint.flake8-tidy-imports]
214
- ban-relative-imports = "all"
215
-
216
- [tool.ruff.lint.isort]
217
- required-imports = ["from __future__ import annotations"]
218
- split-on-trailing-comma = false
File without changes
@@ -1,30 +0,0 @@
1
- [dependency-groups]
2
- group = [
3
- "unbounded",
4
- "lower>=1.2.3",
5
- "upper<1.3",
6
- "lower-and-upper1>=1.2.3,<1.3",
7
- ]
8
-
9
- [project]
10
- dependencies = [
11
- "unbounded",
12
- "lower1>=1.2.3",
13
- "lower2 >= 1.2.3",
14
- "upper1<1.3",
15
- "upper2 < 1.3",
16
- "lower-and-upper1>=1.2.3,<1.3",
17
- "lower-and-upper2<1.3,>=1.2.3",
18
- "lower-and-upper3 >= 1.2.3 , <1.3",
19
- "with-extra[extra]",
20
- "with-extra[extra]>=1.2.3",
21
- "with-extra[extra] >= 1.2.3",
22
- ]
23
-
24
- [project.optional-dependencies]
25
- group = [
26
- "unbounded",
27
- "lower>=1.2.3",
28
- "upper<1.3",
29
- "lower-and-upper1>=1.2.3,<1.3",
30
- ]
@@ -1,30 +0,0 @@
1
- [dependency-groups]
2
- group = [
3
- "unbounded",
4
- "lower >=1.2.3",
5
- "upper <1.3",
6
- "lower-and-upper1 >=1.2.3, <1.3",
7
- ]
8
-
9
- [project]
10
- dependencies = [
11
- "unbounded",
12
- "lower1 >=1.2.3",
13
- "lower2 >=1.2.3",
14
- "upper1 <1.3",
15
- "upper2 <1.3",
16
- "lower-and-upper1 >=1.2.3, <1.3",
17
- "lower-and-upper2 >=1.2.3, <1.3",
18
- "lower-and-upper3 >=1.2.3, <1.3",
19
- "with-extra[extra]",
20
- "with-extra[extra] >=1.2.3",
21
- "with-extra[extra] >=1.2.3",
22
- ]
23
-
24
- [project.optional-dependencies]
25
- group = [
26
- "unbounded",
27
- "lower >=1.2.3",
28
- "upper <1.3",
29
- "lower-and-upper1 >=1.2.3, <1.3",
30
- ]
@@ -1,15 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from pathlib import Path
4
-
5
- from tomlkit import dumps
6
-
7
- from pre_commit_hooks.format_requirements import _format_path
8
-
9
-
10
- class TestFormatRequirements:
11
- def test_basic(self) -> None:
12
- root = Path(__file__).parent
13
- result = dumps(_format_path(root.joinpath("in.toml")))
14
- expected = root.joinpath("out.toml").read_text()
15
- assert result == expected
@@ -1,7 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from pre_commit_hooks import __version__
4
-
5
-
6
- def test_main() -> None:
7
- assert isinstance(__version__, str)