From 8a069db5543e7d289ebc2a0eaf75b5ab81b84899 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Fri, 7 Jun 2013 16:57:49 -0700 Subject: [PATCH] Add HACKING.rst Add HACKING.rst but instead of copying the file around point to the new cannonical location for it https://github.com/openstack-dev/hacking/blob/master/HACKING.rst Also expand out the flake8 H series ignores, so they can be enabled one by one. Change-Id: I6ec39d00c3beabbc3e661754bac6e43a0fb351d6 --- HACKING.rst | 16 ++++++++++++++++ tox.ini | 12 +++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 HACKING.rst diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 000000000..13018d5e6 --- /dev/null +++ b/HACKING.rst @@ -0,0 +1,16 @@ +OpenStack Style Commandments +============================ + +- Step 1: Read http://www.python.org/dev/peps/pep-0008/ +- Step 2: Read http://www.python.org/dev/peps/pep-0008/ again +- Step 3: Read https://github.com/openstack-dev/hacking/blob/master/HACKING.rst + +The OpenStack Style Commandments live here: + + https://github.com/openstack-dev/hacking/blob/master/HACKING.rst + +local-checks +------------ + +None so far + diff --git a/tox.ini b/tox.ini index af0888ec3..44668ce1f 100644 --- a/tox.ini +++ b/tox.ini @@ -37,4 +37,14 @@ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,p # F821 undefined name '' # F841 local variable '' is assigned to but never used # F999 syntax error in doctest -ignore = E121,E126,E127,E128,F401,F403,F811,F821,F841,F999,H +# H101 Use TODO(NAME) +# H201 no 'except:' at least use 'except Exception:' +# H301 one import per line +# H302 import only modules.'from optparse import make_option' does not import a module +# H303 No wildcard (*) import. +# H304 No relative imports. 'from .views import IndexView' is a relative import +# H306 imports not in alphabetical order (horizon.loaders, horizon.conf) +# H4xx docstrings +# H701 empty localization string +# H702 Formatting operation should be outside of localization method call +ignore = E121,E126,E127,E128,F401,F403,F811,F821,F841,F999,H101,H201,H301,H302,H303,H304,H306,H4,H701,H702