Skip to content

Commit a6e8a11

Browse files
authored
detect python3t and remove detection for python3m and pythonu (#897)
1 parent fa7a02c commit a6e8a11

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎pyflakes/api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
__all__ = ['check', 'checkPath', 'checkRecursive', 'iterSourceCode', 'main']
1414

15-
PYTHON_SHEBANG_REGEX = re.compile(br'^#!.*\bpython(3(\.\d+)?|w)?[dmu]?\s')
15+
PYTHON_SHEBANG_REGEX = re.compile(br'^#!.*\bpython(3(\.\d+)?|w)?[dt]?\s')
1616

1717

1818
def check(codeString, filename, reporter=None):

‎pyflakes/test/test_api.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ def test_shebang(self):
178178
with open(python3d, 'w') as fd:
179179
fd.write('#!/usr/local/bin/python3d\n')
180180

181-
python38m = os.path.join(self.tempdir, 'j')
182-
with open(python38m, 'w') as fd:
183-
fd.write('#! /usr/bin/env python3.8m\n')
181+
python312t = os.path.join(self.tempdir, 'j')
182+
with open(python312t, 'w') as fd:
183+
fd.write('#! /usr/bin/env python3.12t\n')
184184

185185
# Should NOT be treated as Python source
186186
notfirst = os.path.join(self.tempdir, 'l')
@@ -191,7 +191,7 @@ def test_shebang(self):
191191
sorted(iterSourceCode([self.tempdir])),
192192
sorted([
193193
python, python3, pythonw, python3args, python3d,
194-
python38m,
194+
python312t,
195195
]))
196196

197197
def test_multipleDirectories(self):

0 commit comments

Comments
 (0)