TIL that when a class attribute is annotated as `typing.Final`, `mypy` will treat it as an error if an instance attribute of the same name is assigned at some point:

«There can be at most one final declaration per module or class for a given attribute. There can’t be separate class-level and instance-level constants with the same name.»

mypy.readthedocs.io/en/stable/

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/SnoopJ/statuses/115812431470773248 on your instance and quote it. (Note that quoting is not supported in Mastodon.)