Skip to content

Commit

Permalink
fix base and poetry pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Aug 29, 2023
1 parent 6006f65 commit 873ac7b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ testpaths = [
"tests",
]
{% endif %}

{%- if cookiecutter.use_blue == "yes" %}
[tool.blue]
line-length = 79
Expand All @@ -19,6 +20,7 @@ force-exclude = '''(?x)(
| .*\\.egg-info
)''' # TOML's single-quoted strings do not require escaping backslashes
{% endif %}

{%- if cookiecutter.use_black == "yes" %}
[tool.black]
line-length = 79
Expand All @@ -28,6 +30,7 @@ force-exclude = '''(?x)(
| .*\\.egg-info
)''' # TOML's single-quoted strings do not require escaping backslashes
{% endif %}

{%- if cookiecutter.use_isort == "yes" %}
[tool.isort]
ensure_newline_before_comments = true
Expand All @@ -36,27 +39,30 @@ multi_line_output = 3
include_trailing_comma = true
skip_glob = ["docs/*", "*.egg-info"]
{% endif %}

{%- if cookiecutter.use_bandit == "yes" %}
[tool.bandit]
exclude_dirs = ["tests"]
targets = "{{ package_path }}"
targets = "./"
{% endif %}

{%- if cookiecutter.use_vulture == "yes" %}
[tool.vulture]
exclude = ["tests"]
ignore_decorators = []
ignore_names = []
make_whitelist = true
min_confidence = 80
paths = ["{{ package_path }}"]
paths = ["./"]
sort_by_size = true
verbose = false
{% endif %}

{%- if cookiecutter.use_ruff == "yes" %}
[tool.ruff]
line-length = 79
force-exclude = true
src = ["{{ package_path }}"]
src = ["./"]
exclude = [
'docs',
]
Expand All @@ -72,9 +78,20 @@ fixable = ["I001"]

[tool.ruff.pydocstyle]
convention = "numpy"

[tool.ruff.isort]
# Use a single line between direct and from import
lines-between-types = 1
{% endif %}

{%- if cookiecutter.use_mypy == "yes" %}
[tool.mypy]
no_strict_optional = false
python_version = "3.8"
check_untyped_defs = true
strict = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
{% endif %}
{#- keep this line at the end of the file -#}
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
{% if cookiecutter.project_layout == "src" -%}
{% set package_path = "src/" + cookiecutter.package_slug -%}
{% else -%}
{% set package_path = cookiecutter.package_slug -%}
{% endif -%}

[tool.poetry]
name = "{{ cookiecutter.project_slug }}"
version = "{{ cookiecutter.project_version }}" # semantic-release
description = "{{ cookiecutter.project_short_description }}"
authors = ["{{ cookiecutter.author_full_name }} <{{ cookiecutter.author_email }}>"]
{% if cookiecutter.project_layout == "src" -%}
packages = [
{include = "{{ cookiecutter.package_slug }}", from="src"},
{include = "{{ package_path }}", from="src"},
]
{% else -%}
packages = [
{include = "{{ cookiecutter.package_slug }}"},
{include = "{{ package_path }}"},
]
{% endif -%}
license = "{{ cookiecutter.project_license }}"
exclude = [
".git/*",
".env*",
]
{%- if cookiecutter.use_mypy == "yes" %}
include = ["{{ package_path }}/py.typed"]
{%- endif %}

[tool.poetry.dependencies]
python = "^3.8.1"
Expand Down

0 comments on commit 873ac7b

Please sign in to comment.