Skip to content

Commit

Permalink
Update pr_mod_file script to be more pythonic.
Browse files Browse the repository at this point in the history
  • Loading branch information
nusbaume committed Aug 10, 2023
1 parent 3e0b39e commit c8e8e80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/pr_mod_file_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ def _file_is_python(filename):

#Check that first non-blank
#line is a shabang:
if line[0:2] == '#!':
if line.startswith("#!"):
#If so, then check that the word
#"python" is also present:
if line.find("python") != -1:
if "python" in line:
#If the word exists, then assume
#it is a python file:
is_python = True
Expand Down

0 comments on commit c8e8e80

Please sign in to comment.