File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ Release date: TBA
2323
2424 Refs #2860
2525
26+ * Add ``HTTPMethod`` enum support to brain module for Python 3.11+.
27+
28+ Closes #4135
29+
2630
2731What's New in astroid 4.0.2?
2832============================
Original file line number Diff line number Diff line change 1414def _http_transform () -> nodes .Module :
1515 code = textwrap .dedent (
1616 """
17- from enum import IntEnum
17+ from enum import IntEnum, StrEnum
1818 from collections import namedtuple
1919 _HTTPStatus = namedtuple('_HTTPStatus', 'value phrase description')
2020
21+ class HTTPMethod(StrEnum):
22+ GET = "GET"
23+ POST = "POST"
24+ PUT = "PUT"
25+ DELETE = "DELETE"
26+ HEAD = "HEAD"
27+ OPTIONS = "OPTIONS"
28+ PATCH = "PATCH"
29+ TRACE = "TRACE"
30+ CONNECT = "CONNECT"
31+
2132 class HTTPStatus(IntEnum):
2233
2334 @property
You can’t perform that action at this time.
0 commit comments