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

Black autoformatter #2144

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Black autoformatter #2144

wants to merge 3 commits into from

Conversation

infirit
Copy link
Contributor

@infirit infirit commented Sep 28, 2023

I was curious and the result is mostly quotes. The command used was black -l 120 -t py38 -t py39 -t py310 -t py311 -t py312.

It can also run as part of the CI. Is it an idea to just have black manage this?

@cschramm
Copy link
Member

Sure 👍, just flake8 isn't happy with the result yet. 😅

@infirit infirit force-pushed the black branch 5 times, most recently from c4c99be to e4170d5 Compare October 9, 2023 17:24
@sonarcloud
Copy link

sonarcloud bot commented Oct 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 26 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@infirit
Copy link
Contributor Author

infirit commented Oct 9, 2023

Sure 👍, just flake8 isn't happy with the result yet. 😅

black is "opinionated" and incompatible with flake8, it's a replacement. I added a new workflow for black and dropped flake8 from checks.

sonarcloud is incorrectly unhappy with hardcoded "IP" addresses. It does have some codesmells I sorta agree with but definitely not all. I'll follow up with another PR to address them.

@cschramm
Copy link
Member

Fine for me, but we should consider adding pylint then.

I think what's going on in SonarCloud is just that all or at least most of those things already existed and were set to ignored, so that they did not show up in the analysis and due to the (whitespace) changes they are now considered new. I just set the security hotspots to "safe", so that it should pass.

@infirit
Copy link
Contributor Author

infirit commented Oct 13, 2023

I'll add pylint to run after black. Hopefully they'll be nice to each other 😰

@github-actions github-actions bot added the stale label Feb 22, 2024
@github-actions github-actions bot closed this Mar 1, 2024
@cschramm cschramm removed the stale label Mar 1, 2024
@cschramm cschramm reopened this Mar 1, 2024
Copy link

sonarcloud bot commented Mar 1, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

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.

None yet

2 participants