aboutsummaryrefslogtreecommitdiff
path: root/discord/flags.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-04-10 20:51:06 -0400
committerRapptz <[email protected]>2021-04-10 20:56:08 -0400
commit3151672cfe8c6b885ccf9971b1b37db5f062b196 (patch)
treeda355de7f36f9bcced9ce7041e20c6545e9943e1 /discord/flags.py
parent[commands] Remove legacy ExtensionNotFound.original attribute (diff)
downloaddiscord.py-3151672cfe8c6b885ccf9971b1b37db5f062b196.tar.xz
discord.py-3151672cfe8c6b885ccf9971b1b37db5f062b196.zip
[commands] Refactor typing evaluation to not use get_type_hints
get_type_hints had a few issues: 1. It would convert = None default parameters to Optional 2. It would not allow values as type annotations 3. It would not implicitly convert some string literals as ForwardRef In Python 3.9 `list['Foo']` does not convert into `list[ForwardRef('Foo')]` even though `typing.List` does this behaviour. In order to streamline it, evaluation had to be rewritten manually to support our usecases. This patch also flattens nested typing.Literal which was not done until Python 3.9.2.
Diffstat (limited to 'discord/flags.py')
0 files changed, 0 insertions, 0 deletions