Changeset - aeb784b3cda5
[Not reviewed]
0 2 1
Patrick Altman - 10 years ago 2014-12-15 22:25:00
paltman@gmail.com
Add tox file and clean up a lint error
3 files changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
.travis.yml
Show inline comments
 
language: python
 

	
 
python:
 
  - 2.7
 

	
 
install:
 
  - pip install flake8
 
  - pip install -e .
 

	
 
script:
 
  - flake8 --max-line-length=100 --max-complexity=24 --statistics --benchmark symposion
 
  - flake8 symposion
symposion/boxes/utils.py
Show inline comments
 
from django.core.exceptions import ImproperlyConfigured
 
try:
 
    from django.utils.importlib import import_module
 
except ImportError:
 
    from importlib import import_module
 

	
 

	
 
def load_path_attr(path):
 
    i = path.rfind(".")
 
    module, attr = path[:i], path[i+1:]
 
    module, attr = path[:i], path[i + 1:]
 
    try:
 
        mod = import_module(module)
 
    except ImportError, e:
 
        raise ImproperlyConfigured("Error importing %s: '%s'" % (module, e))
 
    try:
 
        attr = getattr(mod, attr)
 
    except AttributeError:
 
        raise ImproperlyConfigured("Module '%s' does not define a '%s'" % (module, attr))
 
    return attr
tox.ini
Show inline comments
 
new file 100644
 
[flake8]
 
ignore = E501,E265
 
exclude = migrations
0 comments (0 inline, 0 general)