diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index ff154dd..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,90 +0,0 @@ -ci: - autoupdate_branch: "master" - autoupdate_commit_msg: "update pre-commit hooks" - skip: - - basedpyright - - basedpyright-verifytypes - -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-ast - - id: check-case-conflict - - id: check-executables-have-shebangs - - id: check-illegal-windows-names - - id: check-json - - id: check-merge-conflict - - id: check-shebang-scripts-are-executable - - id: check-symlinks - - id: check-toml - - id: check-vcs-permalinks - - id: check-xml - - id: check-yaml - args: [--unsafe] - - id: debug-statements - - id: destroyed-symlinks - - id: detect-aws-credentials - args: [--allow-missing-credentials] - - id: detect-private-key - - id: fix-byte-order-marker - - id: forbid-submodules - - id: name-tests-test - args: [--pytest-test-first] - - id: no-commit-to-branch - args: [--branch, master] - - id: trailing-whitespace - args: [--markdown-linebreak-ext=md] - exclude_types: [svg] - - - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.10.0 - hooks: - - id: rst-backticks - - id: rst-directive-colons - - id: rst-inline-touching-normal - - - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.5.3 - hooks: - - id: prettier - types_or: [yaml, html, css, scss, javascript, json] - - - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.44.0 - hooks: - - id: markdownlint - - - repo: https://github.com/adamchainz/blacken-docs - rev: 1.19.1 - hooks: - - id: blacken-docs - additional_dependencies: [black==24.*] - - - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 - hooks: - - id: codespell - - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.9 - hooks: - - id: ruff - args: [--fix, --show-fixes] - - id: ruff-format - - - repo: local - hooks: - - id: basedpyright - name: basedpyright - entry: uv run basedpyright - language: system - types_or: [python, pyi] - - - id: basedpyright-verifytypes - name: basedpyright --verifytypes - entry: uv run basedpyright --ignoreexternal --verifytypes lmo - language: system - always_run: true - pass_filenames: false diff --git a/README.md b/README.md index ec5d56f..7d660a3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ [![Lmo - SPEC 0][IMG-SPEC0]][SPEC0] [![Lmo - BSD License][IMG-BSD]][BSD] [![Lmo - CI][IMG-CI]][CI] -[![Lmo - pre-commit][IMG-PC]][PC] [![Lmo - ruff][IMG-RUFF]][RUFF] [![Lmo - bassedpyright][IMG-BPR]][BPR] ![PyPI - Types](https://img.shields.io/pypi/types/Lmo) @@ -133,7 +132,6 @@ See [SPEC 0][SPEC0] for more information. [IMG-SPEC0]: https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038 [IMG-BSD]: https://img.shields.io/github/license/jorenham/Lmo [IMG-CI]: https://img.shields.io/github/actions/workflow/status/jorenham/Lmo/ci.yml?branch=master -[IMG-PC]: https://img.shields.io/badge/pre--commit-enabled-orange?logo=pre-commit [IMG-RUFF]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json [IMG-BPR]: https://img.shields.io/badge/basedpyright-checked-42b983 @@ -143,7 +141,6 @@ See [SPEC 0][SPEC0] for more information. [BSD]: https://github.com/jorenham/Lmo/blob/master/LICENSE [CI]: https://github.com/jorenham/Lmo/actions/workflows/ci.yml?query=branch%3Amaster -[PC]: https://github.com/pre-commit/pre-commit [RUFF]: https://github.com/astral-sh/ruff [BPR]: https://github.com/detachhead/basedpyright/ [PY]: https://github.com/python/cpython diff --git a/docs/contributing.md b/docs/contributing.md index 797ef25..617c7d8 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -20,21 +20,6 @@ You can install the dev dependencies using uv sync ``` -### pre-commit - -Lmo uses [pre-commit](https://pre-commit.com/) to ensure that the code is -formatted and typed correctly when committing the changes. - -```bash -uv run pre-commit install -``` - -It can also be manually run: - -```bash -uv run pre-commit --all-files -``` - ### Testing Lmo uses [pytest](https://docs.pytest.org/en/stable/) and diff --git a/pyproject.toml b/pyproject.toml index b5f3096..6424619 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,6 @@ dev = [ "blacken-docs>=1.19.1", "codespell>=2.3.0", "hypothesis[numpy]>=6.123.17", - "pre-commit>=4.0.1", "basedpyright>=1.24.0", "pytest>=8.3.4", "pytest-doctestplus>=1.3.0", @@ -153,7 +152,7 @@ reportUnusedVariable = false # dupe of F841 [tool.repo-review] # TODO: basedmypy -ignore = ["PC140", "MY", "RTD"] +ignore = ["PY006", "PC140", "MY", "RTD"] [tool.ruff] force-exclude = true @@ -267,7 +266,7 @@ allow-magic-value-types = ["int" ,"str"] [tool.tox] isolated_build = true -env_list = ["repo-review", "pre-commit", "3.11", "3.12", "3.13"] +env_list = ["repo-review", "3.11", "3.12", "3.13"] [tool.tox.env_run_base] description = "test with {base_python}" @@ -276,13 +275,6 @@ allowlist_externals = ["uv"] commands_pre = [["uv", "sync", "--frozen", "--dev"]] commands = [["uv", "run", "pytest"]] -[tool.tox.env.pre-commit] -description = "pre-commit" -skip_install = true -allowlist_externals = ["uv"] -commands_pre = [["uv", "sync", "--frozen", "--dev"]] -commands = [["uv", "run", "pre-commit", "run", "--all-files"]] - [tool.tox.env.repo-review] description = "repo-review" skip_install = true diff --git a/uv.lock b/uv.lock index 5678220..5e51d4f 100644 --- a/uv.lock +++ b/uv.lock @@ -1,4 +1,5 @@ version = 1 +revision = 1 requires-python = ">=3.11" resolution-markers = [ "python_full_version >= '3.12'", @@ -194,15 +195,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7c/fc/6a8cb64e5f0324877d503c854da15d76c1e50eb722e320b15345c4d0c6de/cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a", size = 182009 }, ] -[[package]] -name = "cfgv" -version = "3.4.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249 }, -] - [[package]] name = "chardet" version = "5.2.0" @@ -550,15 +542,6 @@ numpy = [ { name = "numpy" }, ] -[[package]] -name = "identify" -version = "2.6.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cf/92/69934b9ef3c31ca2470980423fda3d00f0460ddefdf30a67adf7f17e2e00/identify-2.6.5.tar.gz", hash = "sha256:c10b33f250e5bba374fae86fb57f3adcebf1161bce7cdf92031915fd480c13bc", size = 99213 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/fa/dce098f4cdf7621aa8f7b4f919ce545891f489482f0bfa5102f3eca8608b/identify-2.6.5-py2.py3-none-any.whl", hash = "sha256:14181a47091eb75b337af4c23078c9d09225cd4c48929f521f3bf16b09d02566", size = 99078 }, -] - [[package]] name = "idna" version = "3.10" @@ -869,7 +852,6 @@ dev = [ { name = "blacken-docs" }, { name = "codespell" }, { name = "hypothesis", extra = ["numpy"] }, - { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-doctestplus" }, { name = "ruff" }, @@ -899,6 +881,7 @@ requires-dist = [ { name = "scipy-stubs", extras = ["scipy"], specifier = ">=1.14.1.6" }, { name = "typing-extensions", marker = "python_full_version < '3.13'", specifier = ">=4.10" }, ] +provides-extras = ["pandas"] [package.metadata.requires-dev] debug = [ @@ -913,7 +896,6 @@ dev = [ { name = "blacken-docs", specifier = ">=1.19.1" }, { name = "codespell", specifier = ">=2.3.0" }, { name = "hypothesis", extras = ["numpy"], specifier = ">=6.123.17" }, - { name = "pre-commit", specifier = ">=4.0.1" }, { name = "pytest", specifier = ">=8.3.4" }, { name = "pytest-doctestplus", specifier = ">=1.3.0" }, { name = "ruff", specifier = ">=0.9.1" }, @@ -1369,15 +1351,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a0/c4/c2971a3ba4c6103a3d10c4b0f24f461ddc027f0f09763220cf35ca1401b3/nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c", size = 5195 }, ] -[[package]] -name = "nodeenv" -version = "1.9.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314 }, -] - [[package]] name = "nodejs-wheel-binaries" version = "22.13.0" @@ -1631,22 +1604,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, ] -[[package]] -name = "pre-commit" -version = "4.0.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cfgv" }, - { name = "identify" }, - { name = "nodeenv" }, - { name = "pyyaml" }, - { name = "virtualenv" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/2e/c8/e22c292035f1bac8b9f5237a2622305bc0304e776080b246f3df57c4ff9f/pre_commit-4.0.1.tar.gz", hash = "sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2", size = 191678 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/16/8f/496e10d51edd6671ebe0432e33ff800aa86775d2d147ce7d43389324a525/pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878", size = 218713 }, -] - [[package]] name = "prompt-toolkit" version = "3.0.48"