From 0faf4c8e2b0ad2b539c2e47eb46acb6dea003865 Mon Sep 17 00:00:00 2001 From: Ryu JuHeon Date: Wed, 21 Jul 2021 15:45:21 +0900 Subject: [PATCH] Stricter type hint in releaselevel --- discord/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/__init__.py b/discord/__init__.py index 5b4419ee8..2a90f2928 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -18,7 +18,7 @@ __version__ = '2.0.0a' __path__ = __import__('pkgutil').extend_path(__path__, __name__) import logging -from typing import NamedTuple +from typing import NamedTuple, Literal from .client import * from .appinfo import * @@ -64,7 +64,7 @@ class VersionInfo(NamedTuple): major: int minor: int micro: int - releaselevel: str + releaselevel: Literal["alpha", "beta", "candidate", "final"] serial: int version_info = VersionInfo(major=2, minor=0, micro=0, releaselevel='alpha', serial=0)