Skip to content

Commit

Permalink
Isort custom sorting (#22)
Browse files Browse the repository at this point in the history
Once astral-sh/ruff#2419 is released
  • Loading branch information
paddyroddy authored May 3, 2023
1 parent 3baadc8 commit 04a2dbe
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ repos:
hooks:
- id: ruff
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.4.2
rev: v1.5.1
hooks:
- id: forbid-tabs
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.0
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
rev: v1.2.0
hooks:
- id: mypy
additional_dependencies: [numpy, pydantic]
Expand Down
31 changes: 20 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ dynamic = [
]
keywords = []
name = "example"
readme = "README.md"
requires-python = ">=3.8"
license.file = "LICENCE.md"
optional-dependencies.dev = [
optional-dependencies = {dev = [
"black",
"build",
"mypy",
"pre-commit",
"ruff",
"tox",
"twine",
]
optional-dependencies.docs = [
], docs = [
"pdoc3",
]
optional-dependencies.readme = [
], readme = [
"pytest-codeblocks",
]
]}
readme = "README.md"
requires-python = ">=3.8"
license.file = "LICENCE.md"
urls.Code = "https://github.com/paddyroddy/python-template"
urls.Documentation = "https://paddyroddy.github.io/python-template/"
urls.Homepage = "https://github.com/paddyroddy/python-template"
urls.Issues = "https://github.com/paddyroddy/python-template/issues"

[tool.coverage]
report = {skip_covered = true, sort = "cover"}
run = {branch = true, parallel = true, source = ["example"]}
run = {branch = true, parallel = true, source = [
"example",
]}
paths.source = [
"src",
".tox*/*/lib/python*/site-packages",
Expand All @@ -77,6 +77,15 @@ ignore = [
"D203",
"D213",
]
isort = {known-first-party = [
"example",
], section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]}
per-file-ignores = {"test_*" = [
"S101",
]}
Expand Down Expand Up @@ -127,7 +136,6 @@ select = [
"YTT",
]
target-version = "py38"
isort.known-first-party = ["example"]
mccabe.max-complexity = 18
pep8-naming.classmethod-decorators = [
"classmethod",
Expand All @@ -144,6 +152,7 @@ spaces_indent_inline_array = 4
trailing_comma_inline_array = true
overrides."project.classifiers".inline_arrays = false
overrides."tool.coverage.paths.source".inline_arrays = false
overrides."tool.ruff.isort.section-order".inline_arrays = false

[tool.tox]
legacy_tox_ini = """
Expand Down

0 comments on commit 04a2dbe

Please sign in to comment.