Comments (6)
I'm okay with doing this but I'd like us to have a very good look at which other PEP8 style things we want to do and just do series of conversions that are only pep8 related and the most obvious changes only.
It will of course force and and all open PR to conflict so we need to be mindful of that
from hardware.
@tbreeds thanks for your answer, what I had in mind with this was just a start towards better defined pep8 rules.
When opening a PR, I usually try to stick to the 80 characters rule and change the module I'm working on, but I agree we should just have pep8 related changes to not mix with code change.
Ideally, after defining a set of style rules we'd like to have I'd go module by module one at a time and apply them.
My starting proposal for the pep8 rules:
- Remove the 160 characters limit and have a standard 80 characters instead.
- Keep ignoring E123 and E125, but remove H803 and H302 from the ignore list.
- Add to enable-extensions:
[H106] Don't put vim configuration in source files.
[H203] Use assertIs(Not)None to check for None.
[H204] Use assert(Not)Equal to check for equality.
[H205] Use assert(Greater|Less)(Equal) for comparison.
It's a lot of change to have all at the same time, so we could also apply only 1 or 2 rules at a time.
from hardware.
My starting proposal for the pep8 rules:
- Remove the 160 characters limit and have a standard 80 characters instead.
- Keep ignoring E123 and E125, but remove H803 and H302 from the ignore list.
I'd actually (I think) like to see E123 and E125 removed from the ignore list
H803 is trivial to get rid of. I think removing H302 would depend on what the pacth looked like. Personally I'm okay with importing parts of modules esp when the code is clean but I could easily be convinced.
- Add to enable-extensions:
[H106] Don't put vim configuration in source files.
[H203] Use assertIs(Not)None to check for None.
[H204] Use assert(Not)Equal to check for equality.
[H205] Use assert(Greater|Less)(Equal) for comparison.
Sure they all look fine to me.
It's a lot of change to have all at the same time, so we could also apply only 1 or 2 rules at a time.
Yup. I guess step one is upgrade to a 'new' version of hacking, step two is the line length an then it's just one rule at a time. It's a lot of churn but if you have time to do it I'll make time to review it
from hardware.
I did a quick test and removing E123,E125,H803 didn't actually change anything, although I think E123 and E125 are actually invalid pep8, so I still suggest to leave them.
We can also leave H302 for the time being.
There is also some refactoring to do on the docstrings in all the modules, but we'll get there.
from hardware.
First simple patch #99
from hardware.
Considering the latest changes, I think this can be closed.
Feel free to re-open it if you feel there's more to discuss.
from hardware.
Related Issues (20)
- A bunch of files in hardware/cardiff/VMs directory make packaging very slow HOT 4
- Adding Riccardo to collaborators? HOT 4
- Mem benchmark fails with Python 3
- Drop Python 2.7 support HOT 5
- TypeError: cannot use a string pattern on a bytes-like object HOT 1
- Exception in network_perf when no network drives detected
- Splitting hardware-cardiff into a new project? HOT 7
- `tox -epep8` fails since commit "a8d10ce detect: Fixing numa cpu_count computation" HOT 2
- Ubuntu 20.04 LTS lshw not compatible HOT 3
- get_ddr_timing should use i2ctools
- Travis CI alternatives HOT 4
- hardware-detect disk benchmark fails to parse modern fio output HOT 2
- RAID controllers HOT 2
- GPU? HOT 2
- Improving the output... HOT 2
- Publish new release with python3 support HOT 3
- hardware-detect fails on ppc64le due to KeyError HOT 1
- CPU benchmark fails with Python 3
- Splitting output by parts HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hardware.