With mypy, you can put # type: ignore at the very top of the file (after shebang and encoding declarations, afaik) and it will not type-check the whole file. This is probably not advisable and this issue probably indicates you’re doing something wrong. From where are you importing AppConfig? Although it may just be that your linter or type-checker is misinterpreting literals as a separate type…