[utah-devel] Python coding standards
Chris Johnston
chrisjohnston at ubuntu.com
Wed Feb 13 00:06:20 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Greetings,
For most of our projects we are using the PEP8 Python coding standard.
One great tool for checking your code is flake8 [1]. Flake8 currently
isn't available in the Ubuntu repositories, and won't be until atleast
the next version of flake8 is released. In the meantime, I have
created a PPA and uploaded the flake8 package to it. To install flake8
on your machine (supports Precise and newer):
sudo add-apt-repository ppa:chrisjohnston/flake8
sudo apt-get update
sudo apt-get install python-flake8
To use flake8 just run:
flake8 [FILENAME]
or
flake8 [DIRECTORY]
Flake8 also can check your code complexity using McCabe's code
complexity script by running:
flake8 --max-complexity X [FILE OR FOLDER NAME] # Where X is the max
complexity that you would like your code to have.
There are also some other cool features that you can learn about on
the flake8 page [2].
[1] https://bitbucket.org/tarek/flake8/wiki/Home
[2] https://bitbucket.org/tarek/flake8/overview
cJ
- --
Respectfully,
Chris Johnston
chrisjohnston at ubuntu.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlEa2PQACgkQyDxSNf9BQVzi/gCcCGe96aeFQIGtsptBNx+A2H1h
JSIAoML7J85kTX3I3qkAXp+MPzbqWUMG
=Baer
-----END PGP SIGNATURE-----
More information about the Ubuntu-utah-devel
mailing list