21 Commits

Author SHA1 Message Date
Kieran Spear
242c8df495 Enable H201: do not write "except:"
Fixes all occurrences of this. We have a custom exception handler
in Horizon anyway that only catches ClientException in most of these
cases, but this commit lets us gate on the other cases.

Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b
Closes-Bug: #1211657
2013-08-13 17:21:32 +10:00
Monty Taylor
dc266f44e7 Updated from global requirements
Change-Id: Ibf423f14a5c37aa298b2115bfd4936f660c6f530
2013-08-08 13:16:35 -03:00
Kun Huang
f585152407 remove 'import *' usage (or mark is #noqa)
This is talked in bug #1188533, and in current codes, there are several
places here:

horizon/forms/__init__.py:18:from django.forms import *
    mark '# noqa'

openstack_dashboard/settings.py:182:    from local.local_settings import *
openstack_dashboard/test/settings.py:5:from horizon.test.settings import *
    mark '# noqa'

openstack_dashboard/dashboards/project/instances/workflows/__init__.py:1:from create_instance import *
openstack_dashboard/dashboards/project/instances/workflows/__init__.py:2:from update_instance import *
openstack_dashboard/dashboards/project/instances/workflows/__init__.py:3:from resize_instance import *
    fix it

openstack_dashboard/dashboards/project/images_and_snapshots/urls.py:21:from django.conf.urls.defaults import *
    fix it

fixes bug # 1188533
Change-Id: Id671280903f8452a78f81f1240d92297de7a89a8
2013-07-30 11:45:39 +08:00
Alex Gaynor
f194236a73 Removed a comment from tox.ini that no longer applied.
This refered to a flake8 rule that's no longer in
use.

Change-Id: Ibeb038c713ae7f91c8e6ca897fe24911da6bd465
2013-07-22 23:39:42 -07:00
Alex Gaynor
56ae8fdfc5 Enable pep8 F841 checking.
This check looks to see whether a local variable
is unused. Also fixed all violators of said check.

Change-Id: I7c186df41b5601078ffc54588aace8136c6576bd
2013-07-22 01:09:52 -07:00
Tatiana Mazur
3087c3486b Enable H304 check
This patch replaces relative imports with full paths and
makes H304 test enabled.

Fixes bug 1188535

Change-Id: I47254cf9a790727102f7993d0fd107da514983df
2013-07-16 18:49:56 +04:00
Sergey Lukjanov
59ef565871 Enable H306 check
H306  imports not in alphabetical order

Change-Id: Ief2accac748248ebf46d4e49230662ff9b233053
2013-07-02 11:38:27 +04:00
Jenkins
f356811ddd Merge "python3: Introduce py33 to tox.ini" 2013-06-26 09:37:39 +00:00
Dirk Mueller
e4ea445a5f Fix Further Pyflakes warnings
Fix occurences of F811 and F821.

Change-Id: I961e62e818ab846f7e1bbc1fdabfe8c051fd70eb
2013-06-26 09:16:28 +02:00
Sergey Lukjanov
d4ada3e555 Enable hacking H101 test
H101  Use TODO(NAME)

Change-Id: Ic30decbf72ac43845bf5b24fe4eead341bf1d2d5
2013-06-24 12:56:15 +04:00
Chuck Short
f8ae8a921a python3: Introduce py33 to tox.ini
Introduce py33 to tox.ini to make testing
easier with python3.

Change-Id: Ie642f154879d36fda856fb9917c7784f93711594
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-21 13:25:04 -05:00
Matthias Runge
cea720e793 Sort imports alphabetically
This patch also re-organizes imports to import one per line.

Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
2013-06-14 12:05:55 +02:00
Matthias Runge
4ac70a732a remove unused imports
In the move to make flake8 tests stricter, we need a code
cleanup earlier.
This removes all unused imports and also enables tests to prevent
them for the future.

This patch also includes the checks on __init__.py files.

Change-Id: I34055803f7c4726682ac6fb95cc5b50ba761fec8
Fixes: bug 1188134
2013-06-13 07:51:10 +02:00
Jenkins
5efdf6e87a Merge "Add HACKING.rst" 2013-06-13 05:35:50 +00:00
Jenkins
f38c5f6cc7 Merge "New tox environment for testing with Django 1.4" 2013-06-12 13:15:09 +00:00
Joe Gordon
8a069db554 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
2013-06-11 10:52:50 -07:00
Sergey Lukjanov
a3d0e379f6 Enable most of the pyflakes checks.
Fixes: bug #1185833

Change-Id: Ife71a86a4c24f97b8bdbaa2c13b7edc05ace34f0
2013-06-05 07:12:31 +00:00
Julie Pichon
a6d72d7bfe New tox environment for testing with Django 1.4
First step toward resolving bug #1183863

Change-Id: Id7dbf011968ea817c547cd020fbf697f7b538181
2013-05-29 12:09:06 +01:00
Jiri Tomasek
5b24518b10 Renames tools/pip-requires to requirements.txt
and tools/test-requires to test-requirements.txt

These are standard files and tools in the
general world are growing intelligence about them.

Change-Id: Iac3c680dd19cabd8ea38598a6e2bb27238030a2d
Fixes: bug #1179008
2013-05-29 12:07:35 +02:00
Monty Taylor
7643f52fb2 Move to flake8.
The project is standardizing on flake8 for static code analysis.

Change-Id: I4fd97b56b6c6cb57e8d245281e0da15f838ec840
2013-05-01 10:32:14 -04:00
Monty Taylor
c93e7c06fd Add ProjectTestingInterface to horizon.
Horizon is the last project that doesn't have support for the common
Project Testing Interface. This gets horizon up to speed with the
other bits, but shouldn't break any of the existing interfaces.

Change-Id: I464c3b10d9708a0b7b5ffd42c88cd3cf515ef6a7
2012-05-26 14:36:19 -07:00