Skip to content

Commit

Permalink
really drop python<=3.7 support.
Browse files Browse the repository at this point in the history
Filter all code oved `pyupgrade --py38-plus`.

Signed-off-by: Tomasz Kłoczko <[email protected]>
  • Loading branch information
kloczek committed Apr 14, 2024
1 parent 2137db6 commit 2a5eeb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hawkmoth/util/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _get_include_paths(cc_path):
return _get_paths_from_output(result.stderr)

def get_include_args(cc_path='clang'):
return ['-I{path}'.format(path=path) for path in _get_include_paths(cc_path)]
return [f'-I{path}' for path in _get_include_paths(cc_path)]

if __name__ == '__main__':
import pprint
Expand Down
4 changes: 2 additions & 2 deletions test/testenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Testcase:

def __init__(self, filename):
self.filename = filename
with open(filename, 'r') as f:
with open(filename) as f:
self.options = strictyaml.load(f.read(), self._options_schema).data
self.testid = os.path.splitext(os.path.relpath(self.filename, testdir))[0]

Expand Down Expand Up @@ -131,5 +131,5 @@ def read_file(filename, optional=False):

assert os.path.isfile(filename)

with open(filename, 'r') as f:
with open(filename) as f:
return f.read()
2 changes: 1 addition & 1 deletion test/update-examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def print_header():
''')

def print_title(testcases):
titles = set(get_title(testcase) for testcase in testcases if get_title(testcase))
titles = {get_title(testcase) for testcase in testcases if get_title(testcase)}
title = ', '.join(sorted(titles))

print(f'''{title}
Expand Down

0 comments on commit 2a5eeb9

Please sign in to comment.