Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyflakes/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

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


def check(codeString, filename, reporter=None):
Expand Down
8 changes: 4 additions & 4 deletions pyflakes/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ def test_shebang(self):
with open(python3d, 'w') as fd:
fd.write('#!/usr/local/bin/python3d\n')

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

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

def test_multipleDirectories(self):
Expand Down
Loading