forked from Lightning-AI/pytorch-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
143 lines (136 loc) · 4.9 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[build-system]
requires = [
"setuptools",
"wheel",
]
[tool.isort]
known_first_party = [
"pl_examples",
"pytorch_lightning",
"lightning_lite",
"tests_pytorch",
]
profile = "black"
line_length = 120
force_sort_within_sections = "False"
order_by_type = "False"
skip = ["_notebooks"]
[tool.black]
line-length = 120
exclude = '(_notebooks/.*)'
[tool.mypy]
files = [
"src/pytorch_lightning",
"src/lightning_lite",
"src/lightning_app/",
]
exclude = [
"src/lightning_app/cli/component-template/",
"src/lightning_app/cli/pl-app-template/",
"src/lightning_app/cli/react-ui-template",
"src/lightning_app/cli/app-template",
]
install_types = "True"
non_interactive = "True"
disallow_untyped_defs = "True"
ignore_missing_imports = "True"
show_error_codes = "True"
warn_redundant_casts = "True"
warn_unused_configs = "True"
warn_unused_ignores = "True"
allow_redefinition = "True"
# disable this rule as the Trainer attributes are defined in the connectors, not in its __init__
disable_error_code = "attr-defined"
# style choices
warn_no_return = "False"
# Ignore mypy errors for these files
# TODO: the goal is for this to be empty
[[tool.mypy.overrides]]
# the list can be generated with:
# mypy --no-error-summary 2>&1 | tr ':' ' ' | awk '{print $1}' | sort | uniq | sed 's/\.py//g; s|src/||g; s|\/|\.|g' | xargs -I {} echo '"{}",'
module = [
"pytorch_lightning.callbacks.progress.rich_progress",
"pytorch_lightning.trainer.trainer",
"pytorch_lightning.tuner.batch_size_scaling",
"lightning_app.api.http_methods",
"lightning_app.api.request_types",
"lightning_app.cli.app-template.app",
"lightning_app.cli.app-template.placeholdername.components.component_a.component_a",
"lightning_app.cli.app-template.placeholdername.components.component_b.component_a",
"lightning_app.cli.app-template.tests.test_placeholdername_app",
"lightning_app.cli.commands.app_commands",
"lightning_app.cli.commands.connection",
"lightning_app.cli.react-ui-template.example_app",
"lightning_app.components.python.popen",
"lightning_app.components.python.tracer",
"lightning_app.components.serve.gradio",
"lightning_app.components.serve.serve",
"lightning_app.components.serve.types.image",
"lightning_app.components.serve.types.type",
"lightning_app.components.training",
"lightning_app.core.api",
"lightning_app.core.app",
"lightning_app.core.flow",
"lightning_app.core.queues",
"lightning_app.core.work",
"lightning_app.frontend.panel.app_state_comm",
"lightning_app.frontend.panel.app_state_watcher",
"lightning_app.frontend.panel.panel_frontend",
"lightning_app.frontend.panel.panel_serve_render_fn",
"lightning_app.frontend.stream_lit",
"lightning_app.frontend.streamlit_base",
"lightning_app.frontend.utils",
"lightning_app.frontend.web",
"lightning_app.runners.backends.__init__",
"lightning_app.runners.backends.backend",
"lightning_app.runners.backends.cloud",
"lightning_app.runners.backends.docker",
"lightning_app.runners.backends.mp_process",
"lightning_app.runners.cloud",
"lightning_app.runners.multiprocess",
"lightning_app.runners.runtime",
"lightning_app.runners.singleprocess",
"lightning_app.source_code.copytree",
"lightning_app.source_code.hashing",
"lightning_app.source_code.local",
"lightning_app.source_code.tar",
"lightning_app.source_code.uploader",
"lightning_app.storage.copier",
"lightning_app.storage.drive",
"lightning_app.storage.orchestrator",
"lightning_app.storage.path",
"lightning_app.storage.payload",
"lightning_app.structures.dict",
"lightning_app.structures.list",
"lightning_app.testing.helpers",
"lightning_app.testing.testing",
"lightning_app.utilities.app_helpers",
"lightning_app.utilities.app_logs",
"lightning_app.utilities.cli_helpers",
"lightning_app.utilities.cloud",
"lightning_app.utilities.cluster_logs",
"lightning_app.utilities.commands.base",
"lightning_app.utilities.component",
"lightning_app.utilities.enum",
"lightning_app.utilities.exceptions",
"lightning_app.utilities.git",
"lightning_app.utilities.imports",
"lightning_app.utilities.introspection",
"lightning_app.utilities.layout",
"lightning_app.utilities.load_app",
"lightning_app.utilities.log_helpers",
"lightning_app.utilities.login",
"lightning_app.utilities.name_generator",
"lightning_app.utilities.network",
"lightning_app.utilities.openapi",
"lightning_app.utilities.packaging.build_config",
"lightning_app.utilities.packaging.cloud_compute",
"lightning_app.utilities.packaging.docker",
"lightning_app.utilities.packaging.lightning_utils",
"lightning_app.utilities.proxies",
"lightning_app.utilities.scheduler",
"lightning_app.utilities.state",
"lightning_app.utilities.tracer",
"lightning_app.utilities.tree",
]
ignore_errors = "True"