blueman icon indicating copy to clipboard operation
blueman copied to clipboard

Black autoformatter

Open infirit opened this issue 2 years ago • 6 comments
trafficstars

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?

infirit avatar Sep 28 '23 20:09 infirit

Sure :+1:, just flake8 isn't happy with the result yet. :sweat_smile:

cschramm avatar Sep 30 '23 04:09 cschramm

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

sonarqubecloud[bot] avatar Oct 09 '23 17:10 sonarqubecloud[bot]

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.

infirit avatar Oct 09 '23 17:10 infirit

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.

cschramm avatar Oct 13 '23 06:10 cschramm

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

infirit avatar Oct 13 '23 09:10 infirit

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Mar 01 '24 08:03 sonarqubecloud[bot]