Issue warning for enum with no members in stub by hauntsaninja · Pull Request #18068 · python/mypy (original) (raw)
Diff from mypy_primer, showing the effect of this PR on open source code:
python-htmlgen (https://github.com/srittau/python-htmlgen)
- htmlgen/form.pyi:8: error: Detected enum "htmlgen.form.Autocomplete" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - htmlgen/form.pyi:8: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- htmlgen/video.pyi:6: error: Detected enum "htmlgen.video.Preload" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - htmlgen/video.pyi:6: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/_internal/vendor/inspect.pyi:196: error: Detected enum "tanjun._internal.vendor.inspect._ParameterKind" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - tanjun/_internal/vendor/inspect.pyi:196: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
pandas (https://github.com/pandas-dev/pandas)
- pandas/_libs/tslibs/dtypes.pyi:31: error: Detected enum "pandas._libs.tslibs.dtypes.FreqGroup" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas/_libs/tslibs/dtypes.pyi:31: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- pandas/_libs/tslibs/dtypes.pyi:48: error: Detected enum "pandas._libs.tslibs.dtypes.Resolution" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas/_libs/tslibs/dtypes.pyi:48: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- pandas/_libs/tslibs/dtypes.pyi:70: error: Detected enum "pandas._libs.tslibs.dtypes.NpyDatetimeUnit" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas/_libs/tslibs/dtypes.pyi:70: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
django-stubs (https://github.com/typeddjango/django-stubs)
- django-stubs/db/models/constants.pyi:5: error: Detected enum "django.db.models.constants.OnConflict" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/db/models/constants.pyi:5: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/contrib/gis/gdal/srs.pyi:7: error: Detected enum "django.contrib.gis.gdal.srs.AxisOrder" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/contrib/gis/gdal/srs.pyi:7: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/template/base.pyi:28: error: Detected enum "django.template.base.TokenType" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/template/base.pyi:28: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/db/models/enums.pyi:44: error: Detected enum "django.db.models.enums.Choices" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/db/models/enums.pyi:44: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/db/models/enums.pyi:63: error: Detected enum "django.db.models.enums.IntegerChoices" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/db/models/enums.pyi:63: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/db/models/enums.pyi:79: error: Detected enum "django.db.models.enums.TextChoices" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/db/models/enums.pyi:79: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/db/models/constraints.pyi:12: error: Detected enum "django.db.models.constraints.Deferrable" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/db/models/constraints.pyi:12: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- django-stubs/contrib/admin/options.pyi:47: error: Detected enum "django.contrib.admin.options.ShowFacets" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - django-stubs/contrib/admin/options.pyi:47: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- pandas-stubs/core/interchange/dataframe_protocol.pyi:16: error: Detected enum "pandas.core.interchange.dataframe_protocol.DlpackDeviceType" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas-stubs/core/interchange/dataframe_protocol.pyi:16: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- pandas-stubs/core/interchange/dataframe_protocol.pyi:26: error: Detected enum "pandas.core.interchange.dataframe_protocol.DtypeKind" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas-stubs/core/interchange/dataframe_protocol.pyi:26: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- pandas-stubs/core/interchange/dataframe_protocol.pyi:35: error: Detected enum "pandas.core.interchange.dataframe_protocol.ColumnNullType" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas-stubs/core/interchange/dataframe_protocol.pyi:35: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
- pandas-stubs/_libs/tslibs/dtypes.pyi:31: error: Detected enum "pandas._libs.tslibs.dtypes.Resolution" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use
member = value
to mark an enum member, instead ofmember: type
[misc] - pandas-stubs/_libs/tslibs/dtypes.pyi:31: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members