From fc4e5d6237f075abb48feb9a7c6f210e36679374 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 7 Mar 2022 18:10:40 -0500 Subject: [PATCH] Fix type checker error in discord.__main__ --- discord/__main__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/discord/__main__.py b/discord/__main__.py index 7ee5b0314..272750079 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -22,6 +22,9 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations +from typing import Dict, Optional + import argparse import sys from pathlib import Path @@ -158,7 +161,7 @@ _cog_extras = ''' # certain file names and directory names are forbidden # see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx # although some of this doesn't apply to Linux, we might as well be consistent -_base_table = { +_base_table: Dict[str, Optional[str]] = { '<': '-', '>': '-', ':': '-',