Skip to content

Conversation

@tellett
Copy link
Contributor

@tellett tellett commented Jan 19, 2023

Fix flake8 and black formatting issues in generated pytest driver by adding a no-op statement instead of an empty string. The previous version resulted in a file with 2 blank lines if chdir was undefined, resulting in the following issues being raised:

bazel-out/k8-fastbuild/bin/REDACTED/__test__.py:21:1: BLK100 Black would make changes.
bazel-out/k8-fastbuild/bin/REDACTED/__test__.py:21:1: W293 blank line contains whitespace
bazel-out/k8-fastbuild/bin/REDACTED/__test__.py:23:5: E303 too many blank lines (2)

@CLAassistant
Copy link

CLAassistant commented Jan 19, 2023

CLA assistant check
All committers have signed the CLA.

@mattem
Copy link
Collaborator

mattem commented Jan 19, 2023

Thanks for the PR!

Can we add a comment around the line in the template that gets replaced? Even if it points to the comment here, it makes the noop assignment a little less mystical to someone looking at the generated code.

@tellett
Copy link
Contributor Author

tellett commented Jan 19, 2023

You're welcome, thanks for the library :) .

I added a comment in the generated file, and verified that it works as intended in my local branch and in my workspace.

@mattem mattem enabled auto-merge (squash) January 19, 2023 13:18
@mattem mattem merged commit c57f053 into aspect-build:main Jan 19, 2023
@tellett tellett deleted the fix_black_issues_in_generated_test_driver branch January 19, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants