Merge pull request #122 from slafs/linting

add flake8 and setup.cfg for linting
This commit is contained in:
Daniel Greenfeld 2014-08-16 14:58:12 -03:00
commit b15e8f91f9
8 changed files with 17 additions and 14 deletions

View File

@ -26,6 +26,7 @@ Henrique G. G. Pereira / @ikkebr
Travis McNeill / gh: Tavistock / @tavistock_esq Travis McNeill / gh: Tavistock / @tavistock_esq
Matt Linares Matt Linares
Russell Davies Russell Davies
Sławek Ehlert / @slafs
* Possesses commit rights * Possesses commit rights

View File

@ -1,3 +1,4 @@
# Test dependencies go here. # Test dependencies go here.
-r base.txt -r base.txt
coverage==3.7.1 coverage==3.7.1
flake8==2.2.2

View File

@ -0,0 +1,4 @@
[flake8]
#ignore = E265
max-line-length = 120
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs

View File

@ -23,7 +23,7 @@ setup(
], ],
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
'Django>=1.6.1', 'Django>=1.6.5',
], ],
zip_safe=False, zip_safe=False,
scripts=['{{ cookiecutter.repo_name }}/manage.py'], scripts=['{{ cookiecutter.repo_name }}/manage.py'],

View File

@ -270,7 +270,6 @@ class Common(Configuration):
} }
########## END LOGGING CONFIGURATION ########## END LOGGING CONFIGURATION
########## Your common stuff: Below this line define 3rd party libary settings ########## Your common stuff: Below this line define 3rd party libary settings
@ -405,4 +404,3 @@ class Production(Common):
########## END CACHING ########## END CACHING
########## Your production stuff: Below this line define 3rd party libary settings ########## Your production stuff: Below this line define 3rd party libary settings

View File

@ -11,7 +11,7 @@ from django.contrib import admin
admin.autodiscover() admin.autodiscover()
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^$', url(r'^$', # noqa
TemplateView.as_view(template_name='pages/home.html'), TemplateView.as_view(template_name='pages/home.html'),
name="home"), name="home"),
url(r'^about/$', url(r'^about/$',
@ -31,4 +31,3 @@ urlpatterns = patterns('',
# Your stuff: custom urls go here # Your stuff: custom urls go here
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@ -4,7 +4,7 @@ from django.conf.urls import patterns, url
from users import views from users import views
urlpatterns = patterns('', urlpatterns = patterns('',
# URL pattern for the UserListView # URL pattern for the UserListView # noqa
url( url(
regex=r'^$', regex=r'^$',
view=views.UserListView.as_view(), view=views.UserListView.as_view(),