Skip to content

Commit 48f55e5

Browse files
authored
Merge pull request #10 from python-project-templates/tkp/isort
cleanup black, add isort
2 parents ee66d0e + 1243524 commit 48f55e5

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ install: ## install library
1818
.PHONY: lint lints fix format
1919

2020
lint: ## run python linter with ruff
21+
python -m isort python_template setup.py --check
2122
python -m ruff python_template setup.py
2223

2324
# Alias
2425
lints: lint
2526

2627
fix: ## fix python formatting with ruff
28+
python -m isort python_template setup.py
2729
python -m ruff format python_template setup.py
2830

2931
# alias

pyproject.toml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Homepage = "https://github.com/python-project-templates/python"
3939
develop = [
4040
"bump2version",
4141
"check-manifest",
42+
"isort",
4243
"mypy",
4344
"pytest",
4445
"pytest-cov",
@@ -54,33 +55,24 @@ test = [
5455
"pytest-cov",
5556
]
5657

57-
[tool.black]
58-
color = true
59-
line-length = 120
60-
target-version = ['py310']
61-
skip-string-normalization = true
62-
6358
[tool.check-manifest]
6459
ignore = []
6560

66-
[tool.ruff]
67-
line-length = 120
68-
69-
[tool.ruff.per-file-ignores]
70-
"__init__.py" = ["F401"]
71-
7261
[tool.isort]
73-
line_length = 120
74-
known_first_party = 'pydantic'
75-
multi_line_output = 3
76-
include_trailing_comma = true
77-
force_grid_wrap = 0
7862
combine_as_imports = true
63+
include_trailing_comma = true
64+
line_length = 120
65+
profile = "black"
66+
67+
default_section = "THIRDPARTY"
68+
sections = "FUTURE,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
69+
70+
known_first_party = "python_template"
7971

8072
[tool.mypy]
81-
python_version = '3.10'
73+
python_version = "3.10"
8274
# show_error_codes = true
83-
# follow_imports = 'silent'
75+
# follow_imports = "silent"
8476
# strict_optional = true
8577
# warn_redundant_casts = true
8678
# warn_unused_ignores = true
@@ -94,5 +86,11 @@ python_version = '3.10'
9486
# disallow_untyped_calls = true
9587

9688
[tool.pytest.ini_options]
97-
asyncio_mode = 'strict'
98-
testpaths = 'python_template/tests'
89+
asyncio_mode = "strict"
90+
testpaths = "python_template/tests"
91+
92+
[tool.ruff]
93+
line-length = 120
94+
95+
[tool.ruff.per-file-ignores]
96+
"__init__.py" = ["F401"]

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
from setuptools import setup
22

3-
43
setup()

0 commit comments

Comments
 (0)