Setup `mypy' for static type checking

This commit is contained in:
Debanjum Singh Solanky 2022-10-08 17:33:13 +03:00
parent d292bdcc11
commit c467df8fa3
2 changed files with 14 additions and 1 deletions

13
.mypy.ini Normal file
View file

@ -0,0 +1,13 @@
[mypy]
strict_optional = False
ignore_missing_imports = True
install_types = True
non_interactive = True
show_error_codes = True
exclude = (?x)(
src/interface/desktop/main_window.py
| src/interface/desktop/file_browser.py
| src/interface/desktop/system_tray.py
| build/*
| tests/*
)

View file

@ -9,7 +9,7 @@ from src.utils.rawconfig import FullConfig
# Do not emit tags when dumping to YAML
yaml.emitter.Emitter.process_tag = lambda self, *args, **kwargs: None
yaml.emitter.Emitter.process_tag = lambda self, *args, **kwargs: None # type: ignore[assignment]
def save_config_to_file(yaml_config: dict, yaml_config_file: Path):