You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2026. It is now read-only.
As per an internal doc, subscripting a container that does not inherit from typing.Generic can cause errors. In particular, a MutableSequence indexed by enums causes an error of the form TypeError: Parameters to generic types must be types. This can be triggered, for example, by code of the form
which we are seeing in the internal part of our publishing pipeline.
Either of these fixes by itself works:
Quoting the type: MutableSequence['dayofweek_pb2.DayOfWeek']
Adding from __future__ import annotations at the top of the file. As per an internal reference, this seems to be related to PEP563, which has a status of Accepted as of 2017, so it's not clear why we would need a fix in the first place.
As per an internal doc, subscripting a container that does not inherit from
typing.Genericcan cause errors. In particular, aMutableSequenceindexed by enums causes an error of the formTypeError: Parameters to generic types must be types. This can be triggered, for example, by code of the formwhich we are seeing in the internal part of our publishing pipeline.
Either of these fixes by itself works:
MutableSequence['dayofweek_pb2.DayOfWeek']from __future__ import annotationsat the top of the file. As per an internal reference, this seems to be related to PEP563, which has a status ofAcceptedas of 2017, so it's not clear why we would need a fix in the first place.We should decide and implement the right fix.