diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62c7b5c..39074fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,14 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files -- repo: https://github.com/psf/black - rev: 23.10.0 - hooks: - - id: black -- repo: https://github.com/charliermarsh/ruff-pre-commit - # Ruff version. - rev: "v0.1.1" +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.16 hooks: - id: ruff + args: [--fix] + - id: ruff-format diff --git a/.python-version b/.python-version index bec3a35..6324d40 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -system +3.14 diff --git a/pyproject.toml b/pyproject.toml index 1b4a85d..efe7aef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,59 +1,6 @@ -[tool.poetry] -name = "template" -version = "0.1.0" -description = "" -authors = ["daviddoji "] - -[tool.poetry.dependencies] -python = ">=3.9,<3.12" -numpy = "^1.21.4" -sympy = "^1.9" -scipy = "^1.8.0" -networkx = "^2.7.1" - -[tool.poetry.dev-dependencies] -pytest = "^5.2" -pytest-cov = "^3.0.0" -pre-commit = "^2.15.0" -flake8 = "^4.0.1" -mypy = "^0.910" -isort = "^5.9.3" -black = {version = "^21.10b0", allow-prereleases = true} - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" - -[tool.isort] -multi_line_output = 3 -include_trailing_comma = true -force_grid_wrap = 0 -use_parentheses = true -line_length = 79 - -[tool.black] -line-length = 79 -target-version = ['py38'] -include = '\.pyi?$' -exclude = ''' - -( - /( - \.eggs # exclude a few common directories in the - | \.git # root of the project - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist - )/ - | foo.py # also separately exclude a file named foo.py in - # the root of the project -) -''' +[tool.ruff] +target-version = "py314" [tool.ruff.lint] ignore = ["E402"] +extend-select = ["I"] # enables import sorting (isort-equivalent)