Skip to content

Commit

Permalink
Merge pull request #2338 from sammiee5311/dev
Browse files Browse the repository at this point in the history
changed alphabet string to string module on setup.py
  • Loading branch information
hwwhww authored Apr 19, 2021
2 parents d9e2d2f + 9e4f5c1 commit e895c29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from distutils.util import convert_path
import os
import re
import string
from typing import Dict, NamedTuple, List

FUNCTION_REGEX = r'^def [\w_]*'
Expand Down Expand Up @@ -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'):
Expand Down

0 comments on commit e895c29

Please sign in to comment.