-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
123 lines (108 loc) · 3.33 KB
/
pyproject.toml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.pytest]
testpaths = "tests"
[tool.coverage.run]
branch = true
source = ["pysurvive"]
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
fail_under = 75
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if False:",
"if __name__ == .__main__.:",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py39,py310
[testenv]
deps =
pygame >= 2.1
pytest >= 7,<8
coverage[toml] >= 6,<7
commands =
coverage run -m pytest
coverage report
[testenv:flake8]
deps =
flake8 >= 4,<5
commands =
flake8
"""
[tool.pylint.MASTER]
ignore-paths= ["tests/*"]
init-hook = "import sys; sys.path.append('pysurvive')"
[tool.pylint.FORMAT]
max-line-length = 88
disable = ["R0902", "R0903", "R0904", "R0911", "R0913","C0103", "C0114", "C0115", "C0116", "C0411"]
[tool.isort]
skip_glob = "venv/*"
profile = "black"
[tool.mypy]
exclude = "tests"
strict = false
# Disallow dynamic typing
# Disallows usage of types that come from unfollowed imports
# (anything imported from an unfollowed import is automatically
# given a type of Any).
disallow_any_unimported = false
# Disallows all expressions in the module that have type Any.
disallow_any_expr = false
# Disallows functions that have Any in their signature
# after decorator transformation.
disallow_any_decorated = false
# Disallows explicit Any in type positions such as type
# annotations and generic type parameters.
disallow_any_explicit = false
# Disallows usage of generic types that do not specify
# explicit type parameters.
disallow_any_generics = true
# Disallows subclassing a value of type Any.
disallow_subclassing_any = false
# Untyped definitions and calls
# Disallows calling functions without type annotations
# from functions with type annotations.
disallow_untyped_calls = false
# Disallows defining functions without type annotations
# or with incomplete type annotations.
disallow_untyped_defs = true
# Disallows defining functions with incomplete type annotations.
disallow_incomplete_defs = true
# Type-checks the interior of functions without type annotations.
check_untyped_defs = true
# Reports an error whenever a function with type annotations is
# decorated with a decorator without annotations.
disallow_untyped_decorators = true
# None and Optional handling
# Changes the treatment of arguments with a default value
# of None by not implicitly making their type Optional.
no_implicit_optional = true
# Enables or disables strict Optional checks. If False,
# mypy treats None as compatible with every type.
strict_optional = false
# Configuring warnings
# Warns about casting an expression to its inferred type.
warn_redundant_casts = true
# Warns about unneeded # type: ignore comments.
warn_unused_ignores = true
# Shows errors for missing return statements on some execution paths.
warn_no_return = 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
# Shows a warning when encountering any code inferred to be unreachable
# or redundant after performing type analysis.
warn_unreachable = true
# Import discovery
# Suppresses error messages about imports that cannot be resolved.
ignore_missing_imports = true