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

Add isort and Black #2929

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Add isort and Black #2929

merged 2 commits into from
Aug 23, 2022

Conversation

lucacome
Copy link
Member

  • Adds isort and Black
  • Formats all the tests

@lucacome lucacome requested a review from a team August 13, 2022 03:50
@lucacome lucacome self-assigned this Aug 13, 2022
@github-actions github-actions bot added the tests Pull requests that update tests label Aug 13, 2022
@lucacome lucacome requested a review from vepatel August 13, 2022 03:51
@lucacome
Copy link
Member Author

@vepatel I noticed this warning 🤔

.../tests/suite/test_prometheus_metrics.py:191: SyntaxWarning: assertion is always true, perhaps remove parentheses?

print(
f"Patch vsr with policy: {mtls_vsr_subroute_src} and vs with tls secret: {tls_secret}"
)
print(f"Patch vsr with policy: {mtls_vsr_subroute_src} and vs with tls secret: {tls_secret}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information

[Sensitive data (secret)](1) is logged here. [Sensitive data (secret)](2) is logged here. [Sensitive data (secret)](3) is logged here.
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2022

Codecov Report

Merging #2929 (f6b95f1) into main (9996ce6) will decrease coverage by 0.02%.
The diff coverage is n/a.

❗ Current head f6b95f1 differs from pull request most recent head a12d01b. Consider uploading reports for the commit a12d01b to get more accurate results

@@            Coverage Diff             @@
##             main    #2929      +/-   ##
==========================================
- Coverage   53.01%   52.99%   -0.03%     
==========================================
  Files          58       58              
  Lines       15651    15651              
==========================================
- Hits         8298     8294       -4     
- Misses       7076     7078       +2     
- Partials      277      279       +2     
Impacted Files Coverage Δ
internal/k8s/configuration.go 95.39% <0.00%> (-0.37%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vepatel
Copy link
Contributor

vepatel commented Aug 16, 2022

@lucacome .../tests/suite/test_prometheus_metrics.py:191: SyntaxWarning: assertion is always true, perhaps remove parentheses? is a legitimate warning because interpreter is treating it as a tuple which is equivalent to assert True, moving parentheses before comma will fix it.

@vepatel
Copy link
Contributor

vepatel commented Aug 16, 2022

@lucacome seems like formatter is failing to execute, should we include a pyproject.toml with black and flake8 config?

@lucacome
Copy link
Member Author

the pyproject.toml already has black, but unfortunately flake8 doesn't support it at least for now PyCQA/flake8#234 (comment)

did you run make lint-python? you would need to run it manually (the workflow in the CI is just a check)...at least until this goes in #2154 😅

@lucacome lucacome merged commit 090d12d into main Aug 23, 2022
@lucacome lucacome deleted the tests/black-isort branch August 23, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Pull requests that update tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants