From 9e4f5c18796a8097fd5f4995122df337a19f55be Mon Sep 17 00:00:00 2001 From: "Sam.An" <56215891+sammiee5311@users.noreply.github.com> Date: Mon, 19 Apr 2021 22:41:45 +0900 Subject: [PATCH] changed alphabet string to string module. changed alphabet string to string module. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 70cf5176e..0fb56e708 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,7 @@ from distutils import dir_util from distutils.util import convert_path import os import re +import string from typing import Dict, NamedTuple, List FUNCTION_REGEX = r'^def [\w_]*' @@ -89,10 +90,10 @@ def get_spec(file_name: str) -> SpecObject: if '`' in row[i]: row[i] = row[i][:row[i].find('`')] is_constant_def = True - if row[0][0] not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_': + if row[0][0] not in string.ascii_uppercase + '_': is_constant_def = False for c in row[0]: - if c not in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789': + if c not in string.ascii_uppercase + '_' + string.digits: is_constant_def = False if is_constant_def: if row[1].startswith('get_generalized_index'):