-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml.jinja
100 lines (85 loc) · 2.68 KB
/
pyproject.toml.jinja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
[project]
name = "{{ project_name }}"
description = "{{ project_description }}"
requires-python = ">= {{ python_version }}"
version = "0.0.1"
dynamic = ["dependencies", "optional-dependencies"]
authors = [
{ name = "{{ author_name }}", email = "{{ author_email }}" },
]
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.in"]}
optional-dependencies = {dev = { file = ["requirements-dev.in"] }}
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.isort]
profile = "black"
[tool.ruff]
# Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E", "F"]
ignore = [
# E501: Do not enforce line length; black does this for code and we do not care about comments / docs
"E501"
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
per-file-ignores = {}
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python {{ python_version }}.
target-version = "py{{ python_version | replace('.', '') }}"
[tool.mypy]
python_version = "{{python_version}}"
python_executable = ".venv/bin/python"
# Warns about per-module sections in the config file that do not match any files processed when invoking mypy.
warn_unused_configs = true
# Shows a warning when returning a value with type Any from a function declared with a non-Any return type.
warn_return_any = true
# Changes the treatment of arguments with a default value of None by not implicitly making their type Optional.
no_implicit_optional = true
# Prohibit equality checks, identity checks, and container checks between non-overlapping types.
strict_equality = true
# Warns about casting an expression to its inferred type.
warn_redundant_casts = true
# No error on unneeded # type: ignore comments.
warn_unused_ignores = true
implicit_reexport = true
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
[[tool.mypy.overrides]]
# module = ["wandb.*", "fastprogress.*", "sklearn.*"]
# follow_imports = "skip"
# follow_imports_for_stubs = true
# Suppresses error messages about imports that cannot be resolved.
# ignore_missing_imports = true