Skip to content

Commit e018dc5

Browse files
hansrajdaspablogsal
authored andcommitted
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
1 parent 5380def commit e018dc5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Parser/pgen/token.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ def generate_tokens(tokens):
66
for line in tokens:
77
line = line.strip()
88

9-
if not line:
10-
continue
11-
if line.strip().startswith('#'):
9+
if not line or line.startswith('#'):
1210
continue
1311

1412
name = line.split()[0]
@@ -22,9 +20,7 @@ def generate_opmap(tokens):
2220
for line in tokens:
2321
line = line.strip()
2422

25-
if not line:
26-
continue
27-
if line.strip().startswith('#'):
23+
if not line or line.startswith('#'):
2824
continue
2925

3026
pieces = line.split()

0 commit comments

Comments
 (0)