openSUSE / obs-service-go_modules

OBS Source Service to download, verify, and vendor Go module dependency sources
GNU General Public License v2.0
19 stars 18 forks source link

Apply flake8 suggested fixes and add flake8 GitHub CI action with black compatible config #29

Closed johanneskastl closed 1 year ago

johanneskastl commented 1 year ago

As I prepared a PR today and wanted to make sure I do not introduce errors, I linted the go_modules file using flake8.

flake8 go_modules
go_modules:74:80: E501 line too long (88 > 79 characters)
go_modules:87:63: W605 invalid escape sequence '\.'
go_modules:87:80: E501 line too long (101 > 79 characters)
go_modules:87:90: W605 invalid escape sequence '\.'
go_modules:87:94: W605 invalid escape sequence '\.'
go_modules:112:80: E501 line too long (90 > 79 characters)
go_modules:119:14: F541 f-string is missing placeholders
go_modules:119:80: E501 line too long (82 > 79 characters)
go_modules:138:80: E501 line too long (80 > 79 characters)
go_modules:144:19: F541 f-string is missing placeholders
go_modules:162:80: E501 line too long (85 > 79 characters)
go_modules:172:80: E501 line too long (81 > 79 characters)
go_modules:216:80: E501 line too long (85 > 79 characters)
go_modules:229:80: E501 line too long (83 > 79 characters)
go_modules:254:80: E501 line too long (87 > 79 characters)
go_modules:260:80: E501 line too long (84 > 79 characters)
go_modules:262:80: E501 line too long (89 > 79 characters)
go_modules:271:25: F541 f-string is missing placeholders
go_modules:271:80: E501 line too long (106 > 79 characters)
go_modules:274:25: F541 f-string is missing placeholders
go_modules:274:80: E501 line too long (95 > 79 characters)

I fixed two easy things and added a flake8 GitHub Action: https://github.com/openSUSE/obs-service-go_modules/pull/28

Not sure if this is desired?

johanneskastl commented 1 year ago

Fixed some more things, only one error left.

jfkw commented 1 year ago

Thanks for the introduction of flake8 CI and the fixes found with it.

I hadn't had a chance yet to compare flake8 formatting results against those of black, apologies for the delay in feedback. @dirkmueller addressed this in d522754e7106ce50431920abb252c4cb9d748090. Going forward, we'll need to maintain the flake8 configuration for zero-diff to black output when discrepancies are encountered.

dirkmueller commented 1 year ago

@jfkw flake8 is just complaining, it isn't reformatting anything.

jfkw commented 1 year ago

We can close this issue now. Thanks everyone for their patience with the noisy commits as we configured and experimented with the configuration of the new CI jobs.