Files
aarian 7a4db0038e chore: enable strict_optional for aqt modules needing no changes (#5645)
Closes #5644. Part of #3317.

22 `aqt` modules already type-check cleanly under `strict_optional`, so
this opts them in. Config only — no code changes.

Verified clean with `mypy --platform` for `darwin`, `linux` and `win32`.

`aqt.mpv` is left out: it sets `ignore_errors = True`, so a stanza there
would be a no-op.
2026-10-01 06:57:28 +03:00

216 lines
4.5 KiB
INI

[mypy]
python_version = 3.10
pretty = False
strict_optional = False
show_error_codes = True
check_untyped_defs = True
disallow_untyped_decorators = True
warn_redundant_casts = True
warn_unused_configs = True
strict_equality = True
namespace_packages = True
explicit_package_bases = True
mypy_path =
pylib,
out/pylib,
qt,
out/qt,
ftl,
pylib/tools,
python
exclude = (pylib/anki/_vendor)
files =
pylib,
qt/aqt,
qt/tools,
out/pylib/anki,
out/qt/_aqt,
python,
tools
cache_dir = out/tests/mypy
[mypy-anki.*]
disallow_untyped_defs = True
[mypy-aqt]
strict_optional = True
[mypy-aqt.browser.*]
strict_optional = True
[mypy-aqt.data.*]
strict_optional = True
[mypy-aqt.forms.*]
strict_optional = True
[mypy-aqt.import_export.*]
strict_optional = True
[mypy-aqt.operations.*]
strict_optional = True
[mypy-aqt.editor]
strict_optional = True
[mypy-aqt.editor_legacy]
strict_optional = True
[mypy-aqt.preferences]
strict_optional = True
[mypy-aqt.overview]
strict_optional = True
[mypy-aqt.customstudy]
strict_optional = True
[mypy-aqt.taglimit]
strict_optional = True
[mypy-aqt.modelchooser]
strict_optional = True
[mypy-aqt.deckdescription]
strict_optional = True
[mypy-aqt.deckbrowser]
strict_optional = True
[mypy-aqt.studydeck]
strict_optional = True
[mypy-aqt.tts]
strict_optional = True
[mypy-aqt.mediasrv]
strict_optional = True
[mypy-aqt.changenotetype]
strict_optional = True
[mypy-aqt.clayout]
strict_optional = True
[mypy-aqt.fields]
strict_optional = True
[mypy-aqt.filtered_deck]
strict_optional = True
[mypy-aqt.editcurrent]
strict_optional = True
[mypy-aqt.deckoptions]
strict_optional = True
[mypy-aqt.notetypechooser]
strict_optional = True
[mypy-aqt.stats]
strict_optional = True
[mypy-aqt.switch]
strict_optional = True
[mypy-aqt.debug_console]
strict_optional = True
[mypy-aqt.emptycards]
strict_optional = True
[mypy-aqt.flags]
strict_optional = True
[mypy-aqt.mediacheck]
strict_optional = True
[mypy-aqt.theme]
strict_optional = True
[mypy-aqt.toolbar]
strict_optional = True
[mypy-aqt.deckchooser]
strict_optional = True
[mypy-aqt.about]
strict_optional = True
[mypy-aqt.webview]
strict_optional = True
[mypy-aqt.mediasync]
strict_optional = True
[mypy-aqt.package]
strict_optional = True
[mypy-aqt.progress]
strict_optional = True
[mypy-aqt.tagedit]
strict_optional = True
[mypy-aqt.utils]
strict_optional = True
[mypy-aqt.sync]
strict_optional = True
[mypy-aqt._macos_helper]
strict_optional = True
[mypy-aqt.ankihub]
strict_optional = True
[mypy-aqt.browser]
strict_optional = True
[mypy-aqt.colors]
strict_optional = True
[mypy-aqt.dbcheck]
strict_optional = True
[mypy-aqt.editcurrent_legacy]
strict_optional = True
[mypy-aqt.gui_hooks]
strict_optional = True
[mypy-aqt.import_export]
strict_optional = True
[mypy-aqt.legacy]
strict_optional = True
[mypy-aqt.log]
strict_optional = True
[mypy-aqt.operations]
strict_optional = True
[mypy-aqt.props]
strict_optional = True
[mypy-aqt.qt]
strict_optional = True
[mypy-aqt.qt.*]
strict_optional = True
[mypy-aqt.schema_change_tracker]
strict_optional = True
[mypy-aqt.stylesheets]
strict_optional = True
[mypy-aqt.taskman]
strict_optional = True
[mypy-aqt.undo]
strict_optional = True
[mypy-aqt.update]
strict_optional = True
[mypy-aqt.url_schemes]
strict_optional = True
[mypy-aqt.widgetgallery]
strict_optional = True
[mypy-anki.scheduler.base]
strict_optional = True
[mypy-anki._backend.rsbridge]
ignore_missing_imports = True
[mypy-anki._vendor.stringcase]
disallow_untyped_defs = False
[mypy-stringcase]
ignore_missing_imports = True
[mypy-aqt.mpv]
disallow_untyped_defs = False
ignore_errors = True
[mypy-aqt.winpaths]
disallow_untyped_defs = False
strict_optional = True
[mypy-win32file]
ignore_missing_imports = True
[mypy-win32pipe]
ignore_missing_imports = True
[mypy-pywintypes]
ignore_missing_imports = True
[mypy-winerror]
ignore_missing_imports = True
[mypy-distro]
ignore_missing_imports = True
[mypy-win32api]
ignore_missing_imports = True
[mypy-xml.dom]
ignore_missing_imports = True
[mypy-psutil]
ignore_missing_imports = True
[mypy-bs4]
ignore_missing_imports = True
[mypy-fluent.*]
ignore_missing_imports = True
[mypy-compare_locales.*]
ignore_missing_imports = True
[mypy-PyQt5.*]
ignore_errors = True
ignore_missing_imports = True
[mypy-send2trash]
ignore_missing_imports = True
[mypy-win32com.*]
ignore_missing_imports = True
[mypy-jsonschema.*]
ignore_missing_imports = True
[mypy-socks]
ignore_missing_imports = True
[mypy-pythoncom]
ignore_missing_imports = True
[mypy-snakeviz.*]
ignore_missing_imports = True
[mypy-wheel.*]
ignore_missing_imports = True
[mypy-anki_audio]
ignore_missing_imports = True