lightning/pyproject.toml

143 lines
4.8 KiB
TOML

[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",
"src/lightning_app/components/database",
"src/lightning_app/frontend/just_py/just_py",
]
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 = [
"lightning_app.api.http_methods",
"lightning_app.api.request_types",
"lightning_app.cli.commands.app_commands",
"lightning_app.cli.commands.connection",
"lightning_app.cli.react-ui-template.example_app",
"lightning_app.components.database.client",
"lightning_app.components.database.server",
"lightning_app.components.database.utilities",
"lightning_app.components.python.popen",
"lightning_app.components.python.tracer",
"lightning_app.components.serve.gradio",
"lightning_app.components.serve.serve",
"lightning_app.components.serve.streamlit",
"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"