Add reportMissingParameterType to pyrightconfig.stricter.json (#8770)

This commit is contained in:
Samuel T
2022-09-21 19:19:09 -04:00
committed by GitHub
parent d7160ca67c
commit dba47e0cfe
5 changed files with 30 additions and 19 deletions

View File

@@ -51,7 +51,6 @@
"stubs/invoke",
"stubs/jmespath",
"stubs/jsonschema",
"stubs/keyboard",
"stubs/ldap3",
"stubs/Markdown",
"stubs/mock",
@@ -99,6 +98,7 @@
"strictSetInference": true,
"reportFunctionMemberAccess": "error",
"reportMissingModuleSource": "none",
"reportMissingParameterType": "error",
"reportMissingTypeStubs": "error",
"reportUnusedImport": "error",
"reportUnusedClass": "error",

View File

@@ -35,7 +35,7 @@ class _MouseListener(_GenericListener):
) -> Literal[True]: ...
def listen(self) -> None: ...
def is_pressed(button: _MouseButton = ...): ...
def is_pressed(button: _MouseButton = ...) -> bool: ...
def press(button: _MouseButton = ...) -> None: ...
def release(button: _MouseButton = ...) -> None: ...
def click(button: _MouseButton = ...) -> None: ...

View File

@@ -1,7 +1,7 @@
# Referenced in: https://pyinstaller.org/en/stable/hooks.html?highlight=get_hook_config#PyInstaller.utils.hooks.get_hook_config
# Not to be imported during runtime, but is the type reference for hooks and analysis configuration
from _typeshed import StrPath
from _typeshed import Incomplete, StrPath
from collections.abc import Iterable
from typing import Any
@@ -13,17 +13,17 @@ class Analysis(Target):
def __init__(
self,
scripts: Iterable[StrPath],
pathex=...,
binaries=...,
datas=...,
hiddenimports=...,
hookspath=...,
pathex: Incomplete | None = ...,
binaries: Incomplete | None = ...,
datas: Incomplete | None = ...,
hiddenimports: Incomplete | None = ...,
hookspath: Incomplete | None = ...,
hooksconfig: dict[str, dict[str, Any]] | None = ...,
excludes=...,
runtime_hooks=...,
cipher=...,
excludes: Incomplete | None = ...,
runtime_hooks: Incomplete | None = ...,
cipher: Incomplete | None = ...,
win_no_prefer_redirects: bool = ...,
win_private_assemblies: bool = ...,
noarchive: bool = ...,
module_collection_mode=...,
module_collection_mode: Incomplete | None = ...,
) -> None: ...

View File

@@ -2,17 +2,26 @@
# The documentation explicitely mentions that "Normally you do not need to know about the module-graph."
# However, some PyiModuleGraph typed class attributes are still documented as existing in imphookapi.
from _typeshed import Incomplete
from _typeshed import Incomplete, StrPath, SupportsKeysAndGetItem
from collections.abc import Iterable
from typing_extensions import TypeAlias
from PyInstaller.lib.modulegraph.modulegraph import Alias, Node
_LazyNode: TypeAlias = Iterable[Node] | Iterable[str] | Alias | None
# from altgraph.Graph import Graph
_Graph: TypeAlias = Incomplete
class PyiModuleGraph: # incomplete
def __init__(
self,
pyi_homepath: str,
user_hook_dirs=...,
excludes=...,
path: Incomplete | None = ...,
replace_paths=...,
implies=...,
graph: Incomplete | None = ...,
user_hook_dirs: Iterable[StrPath] = ...,
excludes: Iterable[str] = ...,
*,
path: Iterable[str] | None = ...,
replace_paths: Iterable[tuple[StrPath, StrPath]] = ...,
implies: SupportsKeysAndGetItem[str, _LazyNode] | Iterable[tuple[str, _LazyNode]] = ...,
graph: _Graph | None = ...,
debug: int = ...,
) -> None: ...

View File

@@ -30,6 +30,8 @@ class Node:
def __ge__(self, other: _SupportsGraphident) -> bool: ...
def infoTuple(self) -> tuple[str]: ...
class Alias(str): ...
class BaseModule(Node):
filename: str
packagepath: str