diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2024-09-08 15:33:07 +0200 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2024-09-08 18:48:05 +0200 |
commit | e7d08d7645dfbd5bff2eed98298012037231c173 (patch) | |
tree | f1344077954d621812af2578febf59d3ffd379bf /pyproject.toml | |
parent | [Lint] Replace black/flake8/isort with ruff (diff) | |
download | deluge-e7d08d7645dfbd5bff2eed98298012037231c173.tar.xz deluge-e7d08d7645dfbd5bff2eed98298012037231c173.zip |
[Typing] Add pyright config to suppress warnings
VSCode uses pylance/pyright, a performant type checker. So
setup the builtins used by Deluge and set missing imports to
informational due to OS-specific imports.
It might be possible using extraPaths with extra stubs or use
defineConstants to make pyright not check Windows or Macos conditional
paths but that would require changing all usage so leaving for another
time.
Refs: https://github.com/microsoft/pyright/blob/main/docs/configuration.md
Refs: https://github.com/microsoft/pyright/blob/main/docs/builtins.md
Diffstat (limited to '')
-rw-r--r-- | pyproject.toml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml index beec7960a..8b65e52dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,3 +58,7 @@ extend-function-names = ["_n"] "deluge/**/gtkui.py" = ["E402"] "deluge/plugins/Stats/deluge_stats/graph.py" = ["E402"] "deluge/ui/gtk3/*.py" = ["E402"] + +[tool.pyright] +reportMissingImports = "information" +reportMissingModuleSource = "information" |