aboutsummaryrefslogtreecommitdiff
path: root/scripts/maint/practracker/includes.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/maint/practracker/includes.py')
-rwxr-xr-xscripts/maint/practracker/includes.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/maint/practracker/includes.py b/scripts/maint/practracker/includes.py
index a5ee728824..46630d987f 100755
--- a/scripts/maint/practracker/includes.py
+++ b/scripts/maint/practracker/includes.py
@@ -40,11 +40,13 @@ def warn(msg):
print(msg, file=sys.stderr)
def fname_is_c(fname):
- """ Return true iff 'fname' is the name of a file that we should
- search for possibly disallowed #include directives. """
- if fname.endswith(".h") or fname.endswith(".c"):
+ """
+ Return true if 'fname' is the name of a file that we should
+ search for possibly disallowed #include directives.
+ """
+ if fname.endswith((".c", ".h")):
bname = os.path.basename(fname)
- return not (bname.startswith(".") or bname.startswith("#"))
+ return not bname.startswith((".", "#"))
else:
return False