mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-25 12:43:45 +00:00
Switched to flake8 in favour of pep8 and pyflakes which allows to ignore certain statements.
This commit is contained in:
parent
80c12b7177
commit
08a9683ae1
3 changed files with 4 additions and 7 deletions
|
|
@ -22,16 +22,14 @@ matrix:
|
|||
- python: "2.5"
|
||||
env: DJANGO=https://github.com/django/django/zipball/master DB=mysql
|
||||
before_script:
|
||||
- pep8 modeltranslation
|
||||
- pyflakes modeltranslation
|
||||
- flake8 modeltranslation
|
||||
- mysql -e 'create database modeltranslation;'
|
||||
- psql -c 'create database modeltranslation;' -U postgres
|
||||
install:
|
||||
- pip install -q mysql-python --use-mirrors
|
||||
- pip install -q psycopg2 --use-mirrors
|
||||
- pip install -q Pillow --use-mirrors
|
||||
- pip install -q pep8 --use-mirrors
|
||||
- pip install -q pyflakes --use-mirrors
|
||||
- pip install -q flake8 --use-mirrors
|
||||
- pip install -q $DJANGO
|
||||
- pip install -e . --use-mirrors
|
||||
script:
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ from django.utils import translation
|
|||
# Ensure that models are registered for translation before TranslationAdmin
|
||||
# runs. The import is supposed to resolve a race condition between model import
|
||||
# and translation registration in production (see issue #19).
|
||||
import modeltranslation.models
|
||||
assert modeltranslation.models # silence pyflakes
|
||||
import modeltranslation.models # NOQA
|
||||
from modeltranslation.settings import DEFAULT_LANGUAGE
|
||||
from modeltranslation.translator import translator
|
||||
from modeltranslation.utils import (get_translation_fields,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ try:
|
|||
from django.conf.urls import include, patterns, url
|
||||
assert (include, patterns, url) # Workaround for pyflakes issue #13
|
||||
except ImportError: # Django 1.3 fallback
|
||||
from django.conf.urls.defaults import include, patterns, url
|
||||
from django.conf.urls.defaults import include, patterns, url # NOQA
|
||||
from django.contrib import admin
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue