andsens / bootstrap-vz

Bootstrap Debian images for virtualized environments
http://bootstrap-vz.readthedocs.io/
Other
263 stars 143 forks source link

Flake8 #494

Closed andrewbogott closed 5 years ago

andrewbogott commented 5 years ago

Lots of lint fixes -- this should get the master branch passing Travis again :)

andsens commented 5 years ago

Dang! Nice job! Regarding the \\d escaping, wouldn't it be easier to just make the string literals raw? As in r'\d'?

andrewbogott commented 5 years ago

wouldn't it be easier to just make the string literals raw? As in r'\d'

It might. I thought I saw some mixed-case examples in there where we had both expanded and non-expanded escapes, but I'll look again and see if that's right.

andrewbogott commented 5 years ago

Yeah, there are a couple of ugly cases which mix valid and invalid escapes:

'127.0.0.1\s*{hostname}\n?'

and

'^\troot (hd0)$'

I'm going to use double-bashes for those and r'' for the clearer cases.

andrewbogott commented 5 years ago

I have another patch ready that addresses those mixed cases... I think they're probably just in error but I don't want to include those changes in this PR since they're (maybe) bugfixes rather than no-ops.

andsens commented 5 years ago

Looks great! Merging...