mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
ignore a spurious mypy error
This commit is contained in:
parent
49770f3159
commit
7e17f9e2ad
1 changed files with 7 additions and 4 deletions
|
@ -61,7 +61,10 @@ def packaged_build_setup() -> None:
|
||||||
_patch_pkgutil()
|
_patch_pkgutil()
|
||||||
|
|
||||||
# escape hatch for debugging issues with packaged build startup
|
# escape hatch for debugging issues with packaged build startup
|
||||||
if os.getenv("ANKI_STARTUP_REPL") and os.isatty(sys.stdin.fileno()):
|
if os.getenv("ANKI_STARTUP_REPL"):
|
||||||
|
# mypy incorrectly thinks this does not exist on Windows
|
||||||
|
is_tty = os.isatty(sys.stdin.fileno()) # type: ignore
|
||||||
|
if is_tty:
|
||||||
import code
|
import code
|
||||||
|
|
||||||
code.InteractiveConsole().interact()
|
code.InteractiveConsole().interact()
|
||||||
|
|
Loading…
Reference in a new issue