mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00: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
|
# 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):
|
def save_config_to_file(yaml_config: dict, yaml_config_file: Path):
|
||||||
|
|
Loading…
Add table
Reference in a new issue