Hi all, Right now, we don't have an official style guide for python. Our style guide ( http://www.gem5.org/documentation/general_docs/development/coding_style/) is very C++ focused.
I would like to propose adopting a relatively strict PEP 8 style guide: https://www.python.org/dev/peps/pep-0008. This is the "official" style guide for python (as much as there is anything official). I say "relatively strict" to mean that we will limit our exceptions *as much as possible*. To implement this, Andreas S. recently pointed me to the "Black" package ( https://pypi.org/project/black/) which automatically fixes code style. I just tried it out with gem5art (patch coming soon) and found that it works really well. The only downside is that it's not configurable at all. Adding special cases would be almost impossible. Concrete and specific proposal: - Adopt PEP 8 as our official style guide - Use black to reformat all python code in src/ - Use black to reformat code in configs/ - Use black to reformat other python code - Use black as part of our commit hook to make sure all future python is formatted to PEP 8 Let me know what you think! Cheers, Jason
_______________________________________________ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s