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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ repos:
args: [--pytest-test-first]
priority: 0
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
rev: v0.24.1
hooks:
- id: validate-pyproject
priority: 0
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.5.0
rev: v2.11.1
hooks:
- id: pyproject-fmt
args: [--max-supported-python=3.14]
Expand Down
36 changes: 20 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ scripts.usethis = "usethis.__main__:app"
[dependency-groups]
dev = [
"basedpyright>=1.36.2",
"codespell>=2.4.1",
"datamodel-code-generator[http]>=0.35.0",
"deptry>=0.23.0",
"import-linter>=2.3",
"jinja2>=3.1.6",
"prek>=0.2.23",
"pyinstrument>=5.1.1",
"pyproject-fmt>=2.11.1",
"ruff>=0.14.3",
"ty>=0.0.1a25",
"validate-pyproject>=0.24.1",
]
test = [
"click>=8.1.8",
Expand Down Expand Up @@ -100,6 +103,11 @@ exclude = [
[tool.hatch.build.hooks.vcs]
version-file = "src/usethis/_version.py"

[tool.uv]
required-version = ">=0.8.18" # Sync with README
default-groups = [ "test", "dev", "doc" ]
link-mode = "symlink"

[tool.ruff]
line-length = 88

Expand Down Expand Up @@ -147,6 +155,7 @@ lint.flake8-type-checking.strict = true
lint.pydocstyle.convention = "google"

[tool.codespell]
skip = [ "site" ]
ignore-words-list = [ "edn" ]

[tool.pyproject-fmt]
Expand Down Expand Up @@ -184,6 +193,17 @@ exclude_also = [
]
omit = [ "*/pytest-of-*/*", "*/_temp/*" ]

[tool.ty]
environment.python-platform = "all"
rules.type-assertion-failure = "ignore"

[[tool.ty.overrides]]
include = [ "src/usethis/_integrations/file/**" ]
rules.invalid-argument-type = "ignore"
rules.invalid-return-type = "ignore"
rules.invalid-assignment = "ignore"
rules.possibly-missing-attribute = "ignore"

[tool.basedpyright]
ignore = [ "src/usethis/_version.py" ]
failOnWarnings = true
Expand Down Expand Up @@ -216,22 +236,6 @@ reportUnusedFunction = false
reportUnusedCallResult = false
reportUnusedParameter = false

[tool.ty]
environment.python-platform = "all"
rules.type-assertion-failure = "ignore"

[[tool.ty.overrides]]
include = [ "src/usethis/_integrations/file/**" ]
rules.invalid-argument-type = "ignore"
rules.invalid-return-type = "ignore"
rules.invalid-assignment = "ignore"
rules.possibly-missing-attribute = "ignore"

[tool.uv]
required-version = ">=0.8.18" # Sync with README
default-groups = [ "test", "dev", "doc" ]
link-mode = "symlink"

[tool.importlinter]
root_packages = [ "usethis" ]

Expand Down
32 changes: 32 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ click==8.1.8 \
# import-linter
# mkdocs
# typer
codespell==2.4.1 \
--hash=sha256:299fcdcb09d23e81e35a671bbe746d5ad7e8385972e65dbb833a2eaac33c01e5 \
--hash=sha256:3dadafa67df7e4a3dbf51e0d7315061b80d265f9552ebd699b3dd6834b47e425
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
Expand Down Expand Up @@ -263,6 +266,10 @@ exceptiongroup==1.2.2 ; python_full_version < '3.11' \
# via
# anyio
# pytest
fastjsonschema==2.21.2 \
--hash=sha256:1c797122d0a86c5cace2e54bf4e819c36223b552017172f32c5c024a6b77e463 \
--hash=sha256:b1eb43748041c880796cd077f1a07c3d94e93ae84bba5ed36800a33554ae05de
# via validate-pyproject
genson==1.3.0 \
--hash=sha256:468feccd00274cc7e4c09e84b08704270ba8d95232aa280f65b986139cec67f7 \
--hash=sha256:e02db9ac2e3fd29e65b5286f7135762e2cd8a986537c075b06fc5f1517308e37
Expand Down Expand Up @@ -758,6 +765,23 @@ pymdown-extensions==10.19.1 \
--hash=sha256:4969c691009a389fb1f9712dd8e7bd70dcc418d15a0faf70acb5117d022f7de8 \
--hash=sha256:e8698a66055b1dc0dca2a7f2c9d0ea6f5faa7834a9c432e3535ab96c0c4e509b
# via mkdocs-material
pyproject-fmt==2.11.1 \
--hash=sha256:08ccf565172179fc7f35a90f4541f68abcdbef7e7a4ea35fcead44f8cabe3e3a \
--hash=sha256:0abae947f93cca80108675c025cb67b96a434f7a33148e3f7945e3009db0d073 \
--hash=sha256:2679527bcbd973f1fc1b0fb31ca84455c3fa10199e776184ff125cd6b5157392 \
--hash=sha256:27a9af1fc8d2173deb7a0bbb8c368a585e7817bcbba6acf00922b73c76c8ee23 \
--hash=sha256:2daf29e4958c310c27ce7750741ef60f79b2f4164df26b1f2bdd063f2beddf4c \
--hash=sha256:44b1edad216b33817d2651a15fb2793807fd7c9cfff1ce66d565c4885b89640e \
--hash=sha256:533da20593e9201320eb6ec939f108c5a1baac141538fd0d5e09a08cf25951bc \
--hash=sha256:5bf986b016eb157b30531d0f1036430023db0195cf2d6fd24e4b43cbc02c0da5 \
--hash=sha256:86f4ebc71d658b848bd14da5f2d2f156a238687e5c9adc0e787ecbf925fd24b1 \
--hash=sha256:8fb86748e061ee9b788fbc93b67c4f2e29fef4b82ece565a00af548d919e0dcd \
--hash=sha256:97b6ba9923975667fab130c23bfd8ead66c4cdea4b66ae238de860a06afbb108 \
--hash=sha256:a2dc64e7d048f32b504504fa1ed3285c81dcf7d97e014b382ede8e437b42855a \
--hash=sha256:a3d38b570bdeabe7b3b27e7aa2798b1091b7259c4ca4080de83e5145ba65b11e \
--hash=sha256:b16ce0874ef2aee219a2c0dacd7c0ce374562c19937bd9c767093ade91e5e452 \
--hash=sha256:f8b184c0eda81022af915694a941b4eecf871be8fc23483a72fa4283c49f2eca \
--hash=sha256:f9950376a9996f07b2b58b8b2ad64023f404f73c2cbc99c216b1add6f33f6cee
pytest==8.3.5 \
--hash=sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820 \
--hash=sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845
Expand Down Expand Up @@ -938,6 +962,10 @@ termcolor==3.1.0 \
--hash=sha256:591dd26b5c2ce03b9e43f391264626557873ce1d379019786f99b0c2bee140aa \
--hash=sha256:6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970
# via pytest-sugar
toml-fmt-common==1.1.0 \
--hash=sha256:92a956c4abf9c14e72d51e4c23149b2596a84ac0c347484e7c36008807e2e0a3 \
--hash=sha256:e4ba8f13e5fe25cfe0bfc60342ad7deb91c741fd31f2e5522e6a51bfbf1427d3
# via pyproject-fmt
tomli==2.2.1 ; python_full_version < '3.12' \
--hash=sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6 \
--hash=sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd \
Expand Down Expand Up @@ -978,6 +1006,7 @@ tomli==2.2.1 ; python_full_version < '3.12' \
# deptry
# import-linter
# pytest
# toml-fmt-common
tomlkit==0.13.3 \
--hash=sha256:430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1 \
--hash=sha256:c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0
Expand Down Expand Up @@ -1031,6 +1060,9 @@ urllib3==2.6.2 \
--hash=sha256:016f9c98bb7e98085cb2b4b17b87d2c702975664e4f060c6532e64d1c1a5e797 \
--hash=sha256:ec21cddfe7724fc7cb4ba4bea7aa8e2ef36f607a4bab81aa6ce42a13dc3f03dd
# via requests
validate-pyproject==0.24.1 \
--hash=sha256:b7b05fa9117204c9c4606ab317acd095b18d1bfc78fb7dc8cc06f77d0582ca2d \
--hash=sha256:e182fc51354add988e5bee6fc06ceb327832a78d921730fc618275e5b29e6b71
watchdog==6.0.0 \
--hash=sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a \
--hash=sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2 \
Expand Down
2 changes: 1 addition & 1 deletion src/usethis/_tool/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def _add_config_item(
break
used_file_managers = new_file_managers

# Now, use the highest-prority file manager to add the config
# Now, use the highest-priority file manager to add the config
(used_file_manager, *_) = used_file_managers

if not config_item.force and entry.keys in used_file_manager:
Expand Down
74 changes: 74 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.