Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit 42fe373

Browse files
committed
fix NOFLAG
1 parent 6c5c791 commit 42fe373

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

whois/tldDb/finders.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def xNewlineSplit(
1818
) -> List[str]:
1919
# split the incoming text on newlines \n\n
2020
what = r"\n\n"
21-
return re.split(what, whoisStr, flags=re.IGNORECASE if ignoreCase else re.NOFLAG)
21+
return re.split(what, whoisStr, flags=re.IGNORECASE if ignoreCase else 0) # NOFLAG is 3.11
2222

2323
return xNewlineSplit
2424

@@ -33,7 +33,7 @@ def reFindAll(
3333
sData: List[str],
3434
verbose: bool = False,
3535
) -> List[str]:
36-
flags = re.IGNORECASE if ignoreCase else re.NOFLAG
36+
flags = re.IGNORECASE if ignoreCase else 0 # NOFLAG is 3.11
3737
return re.findall(reStr, textStr, flags=flags)
3838

3939
return reFindAll
@@ -60,7 +60,7 @@ def xFindFromToAndLookFor(
6060
sData: List[str],
6161
verbose: bool = False,
6262
) -> List[str]:
63-
flags = re.IGNORECASE if ignoreCase else re.NOFLAG
63+
flags = re.IGNORECASE if ignoreCase else 0 # NOFLAG is 3.11
6464
s1 = re.search(fromStr, textStr, flags=flags)
6565
if verbose:
6666
print(f"DEBUG s1 {s1}, {fromStr}", file=sys.stderr)
@@ -136,7 +136,7 @@ def xFindFromToAndLookForWithFindFirst(
136136
sData: List[str],
137137
verbose: bool = False,
138138
) -> List[str]:
139-
flags = re.IGNORECASE if ignoreCase else re.NOFLAG
139+
flags = re.IGNORECASE if ignoreCase else 0 # NOFLAG is 3.11
140140

141141
ff = re.findall(findFirst, textStr, flags=flags)
142142
if ff is None or ff == []:
@@ -197,7 +197,7 @@ def xfindInSplitedLookForHavingFindFirst(
197197
sData: List[str],
198198
verbose: bool = False,
199199
) -> List[str]:
200-
flags = re.IGNORECASE if ignoreCase else re.NOFLAG
200+
flags = re.IGNORECASE if ignoreCase else 0 # NOFLAG is 3.11
201201

202202
ff = re.findall(findFirst, textStr, flags=flags)
203203
if ff is None or ff == []:

0 commit comments

Comments
 (0)