Type `tag` properly
https://github.com/quodlibet/mutagen/blob/9e3ff54b7413b36046754d06f7c50a110ee8327b/mutagen/_file.py#L39
Here, tag should be typed as ID3 | None = None right? (Optional[ID3] for python<3.12)
I had an interest in typing this too and had a look, sadly it is not that easy.
Have a look where tags are assigned, tags can be an instance of a number of different classes (all inheriting from Tags but some also inheriting from Metadata and/or DictProxy ).
E.g.: https://github.com/quodlibet/mutagen/blob/9e3ff54b7413b36046754d06f7c50a110ee8327b/mutagen/m4a.py#L91
https://github.com/quodlibet/mutagen/blob/4394c43cb5e17812b93be2878e5def924caf858f/mutagen/dsdiff.py#L257
can't the type be overridden in those instances then?