Skip to content

Commit 90a41bd

Browse files
committed
cleanup black, add isort
1 parent ee66d0e commit 90a41bd

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
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: 15 additions & 17 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,28 +55,19 @@ 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]
8173
python_version = '3.10'
@@ -96,3 +88,9 @@ python_version = '3.10'
9688
[tool.pytest.ini_options]
9789
asyncio_mode = 'strict'
9890
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)