-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.cfg
62 lines (53 loc) · 2.39 KB
/
setup.cfg
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
# This section configures settings for flake8, a Python linting tool.
[flake8]
# These codes are ignored to allow specific formatting styles:
# - E203: Whitespace before ':' (ignored to align with black's formatting).
# - E704: Multiple statements on one line (def) (ignored for more flexible coding styles).
# - W503: Line break before a binary operator (ignored for PEP 8 compatibility with black).
ignore =
E203,
E704,
W503
# The maximum line length allowed in the code.
# Lines exceeding 99 characters will trigger a warning.
max-line-length = 99
# Enables a summary report after running flake8.
# It shows the count of errors and warnings.
statistics = True
# Files and directories that flake8 should skip during checks.
# Commonly excluded:
# - Virtual environments (.venv, venv).
# - Build artifacts (build).
# - Documentation and tutorial directories.
exclude = .venv,venv,build,tutorial,.asv,docs/visualization_examples,docs/visualization_matplotlib_examples
# This section configures settings for mypy, a Python static type checker.
[mypy]
# Warns if there are unused or misspelled configurations in this section.
warn_unused_configs = True
# Ensures stricter type checking by disallowing the following:
# - Calling functions without type annotations.
disallow_untyped_calls = True
# - Defining functions without type annotations.
disallow_untyped_defs = True
# - Functions/methods with incomplete type annotations.
disallow_incomplete_defs = True
# - Missing type annotations for internal or helper functions.
check_untyped_defs = True
# - Implicitly allowing None (null) values in type hints. Explicit Optional usage is required.
no_implicit_optional = True
# Additional warnings and strictness:
# - Warns when redundant type casts (e.g., unnecessary casts) are found.
warn_redundant_casts = True
# - Enforces strict equality checks for custom objects, avoiding subtle bugs.
strict_equality = True
# - Enables extra checks not included in the default strict mode.
extra_checks = True
# - Disallows re-exporting names in a module unless explicitly stated.
no_implicit_reexport = True
# Ignores missing type stubs for imports that cannot be resolved.
# Useful for third-party libraries that do not provide type hints or stubs.
ignore_missing_imports = True
# Directories and files to exclude from type checking.
# Uses a regex pattern to specify the exclusions:
# For example:
# exclude = path_to_target_directory