mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
mypy: don't ignore all imports, also disallow implicit optional (#8814)
* mypy: don't ignore all imports * mypy: disallow implicit_optional
This commit is contained in:
+41
-3
@@ -112,6 +112,10 @@ tests = [
|
||||
"types-requests",
|
||||
"types-tabulate",
|
||||
"types-toml",
|
||||
"types-appdirs",
|
||||
"types-colorama",
|
||||
"types-psutil",
|
||||
"types-tqdm",
|
||||
]
|
||||
all = ["dvc[azure,gdrive,gs,hdfs,oss,s3,ssh,webdav,webhdfs]"]
|
||||
dev = ["dvc[azure,gdrive,gs,hdfs,oss,s3,ssh,webdav,webhdfs,tests]"]
|
||||
@@ -221,16 +225,50 @@ show_error_codes = true
|
||||
show_error_context = true
|
||||
show_traceback = true
|
||||
pretty = true
|
||||
# See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports.
|
||||
ignore_missing_imports = true
|
||||
implicit_optional = true
|
||||
no_implicit_optional = true
|
||||
check_untyped_defs = false
|
||||
strict_equality = true
|
||||
strict_concatenate = true
|
||||
# Warnings
|
||||
warn_no_return = true
|
||||
warn_redundant_casts = true
|
||||
warn_unused_configs = true
|
||||
warn_unreachable = true
|
||||
files = ["dvc"]
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"celery.*",
|
||||
"configobj.*",
|
||||
"dpath.*",
|
||||
"dvc_data.*",
|
||||
"dvc_http.*",
|
||||
"dvc_objects.*",
|
||||
"dvc_render.*",
|
||||
"dvc_ssh",
|
||||
"dvc_studio_client.*",
|
||||
"dvc_task.*",
|
||||
"flatten_dict",
|
||||
"fsspec.*",
|
||||
"funcy.*", # https://github.com/Suor/funcy/issues/106,
|
||||
"grandalf.*",
|
||||
"ipdb",
|
||||
"iterative_telemetry",
|
||||
"kombu.*",
|
||||
"networkx.*", # https://github.com/networkx/networkx/issues/3988
|
||||
"pygtrie.*",
|
||||
"pyinstrument",
|
||||
"pytest_docker.plugin",
|
||||
"ruamel.yaml.*",
|
||||
"scmrepo.*",
|
||||
"tpi.*",
|
||||
"viztracer",
|
||||
"voluptuous",
|
||||
"yappi",
|
||||
"zc.*",
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.pylint.master]
|
||||
extension-pkg-whitelist = ["pygit2"]
|
||||
init-hook = "import sys; sys.path.append(str('tests'))"
|
||||
|
||||
Reference in New Issue
Block a user