python/py3: fix type stubs for enums
commit09ff8d355cf3380f2d50056d9c252db3bddf8d0e
authorJun Zhou <junz@meta.com>
Sat, 15 Oct 2022 16:42:45 +0000 (15 09:42 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 15 Oct 2022 16:42:45 +0000 (15 09:42 -0700)
tree86213995be01dce55871b1b1ec85e484e9165cbf
parente5ad91345b8e0523738d7638caed0cd4a613ab96
python/py3: fix type stubs for enums

Summary:
with

```
class Priority(Enum):
    ...
    value: int
```

pyre will think `value` is another member of the `Priority` enum, instead of a property of all `Priority` enums, and somehow ignore the `: int` hint

it might be a pyre bug, but there is a workaround: we can replace it with

```
class Priority(Enum):
    ...
    property
    def value(self) -> int: ...
```

which will clear the confusion

Reviewed By: ParalaxRus

Differential Revision: D40392028

fbshipit-source-id: 005d408c24a257a787aff4e2c2c6af23be50da08
third-party/thrift/src/thrift/lib/py3/common.pyi
third-party/thrift/src/thrift/lib/py3/exceptions.pyi
third-party/thrift/src/thrift/lib/py3/server.pyi
third-party/thrift/src/thrift/lib/py3/ssl.pyi
third-party/thrift/src/thrift/lib/py3/test/common.py [new file with mode: 0644]
third-party/thrift/src/thrift/lib/python/client/ssl.pyi