mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Setup `mypy' for static type checking
This commit is contained in:
parent
d292bdcc11
commit
c467df8fa3
2 changed files with 14 additions and 1 deletions
13
.mypy.ini
Normal file
13
.mypy.ini
Normal 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/*
|
||||
)
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue