Skip to content

Commit 34ac92e

Browse files
DimitriPapadopoulosmattip
authored andcommitted
Apply ruff/flake8-pie rule PIE810
PIE810 Call `startswith` once with a `tuple` PIE810 Call `endswith` once with a `tuple`
1 parent 9a4c740 commit 34ac92e

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

testing/cffi1/test_cffi_binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_no_unknown_exported_symbols():
1717
if '*UND*' in line:
1818
continue
1919
name = line.split()[-1]
20-
if name.startswith('_') or name.startswith('.'):
20+
if name.startswith(('_', '.')):
2121
continue
2222
# a statically-linked libffi will always appear here without header hackage, ignore it if it's internal
2323
if name.startswith('ffi_') and 'Base' in line:

testing/cffi1/test_zdist.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ def check_produced_files(self, content, curdir=None):
7070
curdir = str(self.udir)
7171
found_so = None
7272
for name in os.listdir(curdir):
73-
if (name.endswith('.so') or name.endswith('.pyd') or
74-
name.endswith('.dylib') or name.endswith('.dll')):
73+
if (name.endswith(('.so', '.pyd', '.dylib', '.dll'))):
7574
found_so = os.path.join(curdir, name)
7675
# foo.so => foo
7776
parts = name.split('.')

0 commit comments

Comments
 (0)