mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Enable strict type checking for Pyright
Doc: https://github.com/microsoft/pyright/blob/main/docs/configuration.md#type-check-diagnostics-settings PR #23634.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# VERSION: 1.50
|
||||
# VERSION: 1.51
|
||||
|
||||
# Author:
|
||||
# Fabien Devaux <fab AT gnux DOT info>
|
||||
@@ -61,7 +61,7 @@ THREADED: bool = True
|
||||
try:
|
||||
MAX_THREADS: int = cpu_count()
|
||||
except NotImplementedError:
|
||||
MAX_THREADS = 1
|
||||
MAX_THREADS = 1 # pyright: ignore[reportConstantRedefinition]
|
||||
|
||||
Category = Enum('Category', ['all', 'anime', 'books', 'games', 'movies', 'music', 'pictures', 'software', 'tv'])
|
||||
|
||||
@@ -106,7 +106,7 @@ def list_engines() -> list[EngineModuleName]:
|
||||
Return list of all engines' module name
|
||||
"""
|
||||
|
||||
names = []
|
||||
names: list[EngineModuleName] = []
|
||||
|
||||
for engine_path in glob(path.join(path.dirname(__file__), 'engines', '*.py')):
|
||||
engine_module_name = path.basename(engine_path).split('.')[0].strip()
|
||||
|
||||
@@ -21,5 +21,8 @@ dev = [
|
||||
explicit_package_bases = true
|
||||
strict = true
|
||||
|
||||
[tool.pyright]
|
||||
typeCheckingMode = "strict"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["./"]
|
||||
|
||||
Reference in New Issue
Block a user