Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ repos:
name: black
types:
- python
- args:
- '--filter-files'
entry: pipenv run python -m isort
- entry: pipenv run python -m isort
id: isort
language: system
name: isort
Expand All @@ -62,7 +60,7 @@ repos:
name: ruff
types:
- python
- entry: pipenv run toml-sort -a -i
- entry: pipenv run toml-sort --check
id: toml-sort
language: system
name: toml-sort
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ruff:
${PIPRUN} python -m ruff docs tests src

toml-sort:
${PIPRUN} toml-sort -a -i pyproject.toml
${PIPRUN} toml-sort pyproject.toml

tests:
${PIPRUN} python -m pytest .
Expand Down
2 changes: 1 addition & 1 deletion Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ruff:
${PIPRUN} python -m ruff docs tests src

toml-sort:
${PIPRUN} toml-sort -a -i pyproject.toml
${PIPRUN} toml-sort pyproject.toml

tests:
${PIPRUN} python -m pytest .
Expand Down
27 changes: 18 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"setuptools-scm"
"setuptools-scm",
]

[project]
authors = [
{email = "i@huxuan.org", name = "huxuan"}
{email = "i@huxuan.org", name = "huxuan"},
]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -16,19 +16,19 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9"
"Programming Language :: Python :: 3.9",
]
description = "A serious Python project template for out-of-box and production usage."
dynamic = [
"dependencies",
"optional-dependencies",
"version"
"version",
]
keywords = [
"out-of-box",
"production",
"project template",
"template"
"template",
]
name = "serious-scaffold"
readme = "README.md"
Expand All @@ -46,18 +46,22 @@ fail_under = 100

[tool.coverage.run]
omit = [
"src/{{ module_name }}/*"
"src/{{ module_name }}/*",
]

[tool.isort]
filter_files = true
profile = "black"

[tool.mypy]
check_untyped_defs = true
disallow_any_unimported = true
disallow_untyped_defs = true
enable_error_code = [
"ignore-without-code"
"ignore-without-code",
]
exclude = [
"src/{{ module_name }}"
"src/{{ module_name }}",
]
no_implicit_optional = true
show_error_codes = true
Expand All @@ -84,7 +88,7 @@ extend-ignore = [
"D407",
"D408",
"D409",
"D413"
"D413",
]
fix = true
per-file-ignores = {"tests/*" = ["S101"]}
Expand All @@ -102,3 +106,8 @@ package = {file = ["requirements/package.txt"]}
tests = {file = ["requirements/tests.txt"]}

[tool.setuptools_scm]

[tool.tomlsort]
all = true
in_place = true
trailing_comma_inline_array = true
27 changes: 18 additions & 9 deletions pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"setuptools-scm"
"setuptools-scm",
]

[project]
authors = [
{email = "{{ author_email }}", name = "{{ author_name }}"}
{email = "{{ author_email }}", name = "{{ author_name }}"},
]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -16,19 +16,19 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9"
"Programming Language :: Python :: 3.9",
]
description = "{{ project_description }}"
dynamic = [
"dependencies",
"optional-dependencies",
"version"
"version",
]
keywords = [
"out-of-box",
"production",
"project template",
"template"
"template",
]
name = "{{ package_name }}"
readme = "README.md"
Expand All @@ -47,20 +47,24 @@ fail_under = 100
[tool.coverage.run]
omit = [
{%- if project_name == "Serious Scaffold Python" %}
"src/{{ '{{ module_name }}' }}/*"
"src/{{ '{{ module_name }}' }}/*",
{%- endif %}
]

[tool.isort]
filter_files = true
profile = "black"

[tool.mypy]
check_untyped_defs = true
disallow_any_unimported = true
disallow_untyped_defs = true
enable_error_code = [
"ignore-without-code"
"ignore-without-code",
]
exclude = [
{%- if project_name == "Serious Scaffold Python" %}
"src/{{ '{{ module_name }}' }}"
"src/{{ '{{ module_name }}' }}",
{%- endif %}
]
no_implicit_optional = true
Expand Down Expand Up @@ -88,7 +92,7 @@ extend-ignore = [
"D407",
"D408",
"D409",
"D413"
"D413",
]
fix = true
per-file-ignores = {"tests/*" = ["S101"]}
Expand All @@ -106,3 +110,8 @@ package = {file = ["requirements/package.txt"]}
tests = {file = ["requirements/tests.txt"]}

[tool.setuptools_scm]

[tool.tomlsort]
all = true
in_place = true
trailing_comma_inline_array = true