Skip to content

Short form of enum.StrEnum fails #946

Open
@dave-shawley

Description

@dave-shawley

Pyre Bug

Bug description

Similar to #698 only using enum.StrEnum in place of enum.Enum.

Reproduction steps

import enum

Color = enum.StrEnum('Color', ['Red', 'Blue'])
print(Color.Red)

Expected behavior

Type checking works.

Logs
Please include any relevant logs here:

ƛ No watchman binary found.
To enable pyre incremental, you can install watchman: https://facebook.github.io/watchman/docs/install
ƛ Defaulting to non-incremental check.
ƛ Found 2 type errors!
checkit.py:3:8 Too many arguments [19]: Call `enum.StrEnum.__new__` expects 1 positional argument, 2 were provided.
checkit.py:4:6 Undefined attribute [16]: `enum.StrEnum` has no attribute `Red`.
zsh: exit 1     pyre

Please run your reproduction steps followed by pyre rage > pyre_rage.log, and upload the file here:

pyre_rage.log

Additional context

Using hatch to manage virtual environments and have pyre installed into the environment.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions