commit 677b0c9f6d9d7793a6a2c961036017076fe2abf4 parent fe6898157cc3a1e66e4fe58fc2264bbebab75d53 Author: Nick Mathewson <nickm@torproject.org> Date: Tue, 7 Sep 2021 07:51:07 -0400 Merge remote-tracking branch 'tor-gitlab/mr/426' Diffstat:
| M | scripts/maint/practracker/includes.py | | | 10 | ++++++---- |
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git 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