summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-09-07 07:51:07 -0400
committerNick Mathewson <nickm@torproject.org>2021-09-07 07:51:07 -0400
commit677b0c9f6d9d7793a6a2c961036017076fe2abf4 (patch)
tree62a92f55ce9ca88339e725ac287c87835f8f9836
parentfe6898157cc3a1e66e4fe58fc2264bbebab75d53 (diff)
parente5b234e3582aef3476efb6bfc3d47981b3fb038f (diff)
downloadtor-677b0c9f6d9d7793a6a2c961036017076fe2abf4.tar.gz
tor-677b0c9f6d9d7793a6a2c961036017076fe2abf4.zip
Merge remote-tracking branch 'tor-gitlab/mr/426'
-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