Skip to content

Commit bc57439

Browse files
committed
chore: Fix linter errors
1 parent a04c5d7 commit bc57439

File tree

8 files changed

+5
-27
lines changed

8 files changed

+5
-27
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
from .documents import *
2-
from .utils import *
1+
from .documents import * # noqa: F403
2+
from .utils import * # noqa: F403

django_mongoengine/mongo_admin/management/commands/createmongodbsuperuser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def handle(self, *args, **options):
7373
email = options.get('email', None)
7474
interactive = options.get('interactive')
7575
verbosity = int(options.get('verbosity', 1))
76-
database = options.get('database')
7776

7877
# Do quick and dirty validation if --noinput
7978
if not interactive:

django_mongoengine/mongo_admin/util.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ def label_for_field(name, model, model_admin=None, return_attr=False):
2121
field = model._meta.get_field_by_name(name)[0]
2222
label = field.name.replace('_', ' ')
2323
except FieldDoesNotExist:
24-
if name == "__unicode__":
25-
label = force_str(model._meta.verbose_name)
26-
elif name == "__str__":
24+
if name == "__str__":
2725
label = smart_str(model._meta.verbose_name)
2826
else:
2927
if callable(name):

django_mongoengine/mongo_admin/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def sign(t):
9191

9292
qs_ordering = [sign(t) + t[0] for t in queryset._ordering]
9393
ordering.extend(qs_ordering)
94-
except:
94+
except: # noqa: E722
9595
pass
9696

9797
# Ensure that the primary key is systematically present in the list of
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
from django.contrib.auth.models import Group, User
2-
3-
from django_mongoengine import mongo_admin
4-
5-
# admin.site.unregister(Group)
6-
# admin.site.unregister(User)
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
try:
2-
from django.db.models.utils import resolve_callables
3-
except ImportError:
4-
from .backports import resolve_callables

django_mongoengine/utils/backports.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

example/tumblelog/tumblelog/wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# This application object is used by any WSGI server configured to use this
2121
# file. This includes Django's development server, if the WSGI_APPLICATION
2222
# setting points here.
23-
from django.core.wsgi import get_wsgi_application
23+
from django.core.wsgi import get_wsgi_application # noqa: E402
2424

2525
application = get_wsgi_application()
2626

0 commit comments

Comments
 (0)