Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: Fix flake8 issues caused by code being a template #1160

Merged
merged 2 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ max-line-length = 99
ignore =
W504, # W504: Line break occurred after a binary operator
E741 # E741: Do not use variables named 'I', 'O', or 'l'
exclude = setup.py,
exclude =
asv/extern,
test/benchmark.invalid,
test/example_results,
Expand Down
6 changes: 5 additions & 1 deletion test/test_repo_template/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

from setuptools import setup

# This file is a template, and will be rendered before executed.
# So the double curly brackets will become single after rendering, and
# when executed, this will work as expected
content = 'env = {{}}\n'.format(repr(dict(os.environ))) # noqa W291 see above comment
with open('asv_test_repo/build_time_env.py', 'w') as f:
f.write("env = {{}}\n".format(repr(dict(os.environ))))
f.write(content)

setup(name='asv_test_repo',
version="{version}",
Expand Down