mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 06:18:07 +00:00
style(tools): fix type annotations in pyright tool
This commit is contained in:
parent
61718aff49
commit
e9364ea0ae
@ -51,12 +51,12 @@ from typing import TYPE_CHECKING, Any, Final, Iterator, TypedDict
|
|||||||
import click
|
import click
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
LineIgnores = list[LineIgnore]
|
LineIgnores = list["LineIgnore"]
|
||||||
|
|
||||||
FileIgnores = dict[str, LineIgnores]
|
FileIgnores = dict[str, LineIgnores]
|
||||||
FileSpecificIgnores = dict[str, list[FileSpecificIgnore]]
|
FileSpecificIgnores = dict[str, list["FileSpecificIgnore"]]
|
||||||
|
|
||||||
PyrightOffIgnores = list[PyrightOffIgnore]
|
PyrightOffIgnores = list["PyrightOffIgnore"]
|
||||||
FilePyrightOffIgnores = dict[str, PyrightOffIgnores]
|
FilePyrightOffIgnores = dict[str, PyrightOffIgnores]
|
||||||
|
|
||||||
|
|
||||||
@ -604,7 +604,13 @@ class PyrightTool:
|
|||||||
help="Use input file instead of running pyright",
|
help="Use input file instead of running pyright",
|
||||||
)
|
)
|
||||||
@click.option("-v", "--verbose", is_flag=True, help="Print verbose output")
|
@click.option("-v", "--verbose", is_flag=True, help="Print verbose output")
|
||||||
def main(config, input_file, output_file, verbose, workdir):
|
def main(
|
||||||
|
config: io.TextIOWrapper | None,
|
||||||
|
input_file: io.TextIOWrapper | None,
|
||||||
|
output_file: io.TextIOWrapper | None,
|
||||||
|
verbose: bool,
|
||||||
|
workdir: str | Path,
|
||||||
|
) -> None:
|
||||||
workdir = Path(workdir)
|
workdir = Path(workdir)
|
||||||
if config is None:
|
if config is None:
|
||||||
config_path = workdir / "pyrightconfig.json"
|
config_path = workdir / "pyrightconfig.json"
|
||||||
|
Loading…
Reference in New Issue
Block a user