Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Jan 3, 2018
1 parent 56780d5 commit 94eecc1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions djburger/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class StatusCodeError(ValidationError):
:param \**kwargs: kwargs for ValidationError.
"""

def __init__(self, status_code, **kwargs):
def __init__(self, status_code, msg, **kwargs):
self.status_code = status_code
self.msg = msg
super(StatusCodeError, self).__init__(**kwargs)
super(StatusCodeError, self).__init__(msg, **kwargs)


class SubValidationError(ValidationError):
Expand Down
2 changes: 0 additions & 2 deletions djburger/mocks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@



class DjangoFormBase(object):
def __init__(self, **kwargs):
raise ImportError("Django is not installed yet")
Expand Down
2 changes: 1 addition & 1 deletion djburger/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# BSON
try:
from bson import loads as _bson
except:
except ImportError:
_bson = None


Expand Down
6 changes: 3 additions & 3 deletions djburger/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
# PyYAML
try:
import yaml as _yaml
except:
except ImportError:
_yaml = None


# BSON
try:
import bson as _bson
except:
except ImportError:
_bson = None


# tablib
try:
from tablib import Dataset as _Tablib
except:
except ImportError:
_Tablib = None # noQA


Expand Down
2 changes: 1 addition & 1 deletion djburger/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
else:
is_django_installed = True
try:
from django.conf import settings
from django.conf import settings # noQA
except ImproperlyConfigured:
is_django_active = False
else:
Expand Down
1 change: 0 additions & 1 deletion djburger/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# built-in
from collections import namedtuple
from functools import update_wrapper
# project
from .exceptions import StatusCodeError, SubValidationError
from .parsers import Default as _DefaultParser
Expand Down

0 comments on commit 94eecc1

Please sign in to comment.