mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
isort config that's aligned with black settings.
This commit is contained in:
parent
a1a048462d
commit
275addaca4
4 changed files with 13 additions and 8 deletions
2
Pipfile
2
Pipfile
|
@ -18,7 +18,7 @@ sphinxcontrib-httpdomain = "*"
|
||||||
|
|
||||||
[scripts]
|
[scripts]
|
||||||
test = "./runtests.py"
|
test = "./runtests.py"
|
||||||
cleanup = "sh -c \"black --skip-string-normalization --line-length=80 --exclude='/(migrations)/' dpaste && isort -rc dpaste\""
|
cleanup = "sh -c \"isort -rc dpaste && black --skip-string-normalization --line-length=80 --exclude='/(migrations)/' dpaste\""
|
||||||
|
|
||||||
[pipenv]
|
[pipenv]
|
||||||
allow_prereleases = true
|
allow_prereleases = true
|
||||||
|
|
|
@ -4,8 +4,11 @@ from textwrap import dedent
|
||||||
|
|
||||||
from django.test import TestCase
|
from django.test import TestCase
|
||||||
|
|
||||||
from dpaste.highlight import (PlainCodeHighlighter, PygmentsHighlighter,
|
from dpaste.highlight import (
|
||||||
RestructuredTextHighlighter)
|
PlainCodeHighlighter,
|
||||||
|
PygmentsHighlighter,
|
||||||
|
RestructuredTextHighlighter,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class HighlightAPITestCase(TestCase):
|
class HighlightAPITestCase(TestCase):
|
||||||
|
|
|
@ -7,8 +7,8 @@ from django.http import (
|
||||||
Http404,
|
Http404,
|
||||||
HttpResponse,
|
HttpResponse,
|
||||||
HttpResponseBadRequest,
|
HttpResponseBadRequest,
|
||||||
HttpResponseRedirect,
|
|
||||||
HttpResponseForbidden,
|
HttpResponseForbidden,
|
||||||
|
HttpResponseRedirect,
|
||||||
)
|
)
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
@ -157,9 +157,7 @@ class SnippetRawView(SnippetDetailView):
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if not config.RAW_MODE_ENABLED:
|
if not config.RAW_MODE_ENABLED:
|
||||||
return HttpResponseForbidden(
|
return HttpResponseForbidden(
|
||||||
ugettext(
|
ugettext('This dpaste installation has Raw view mode disabled.')
|
||||||
'This dpaste installation has Raw view mode disabled.'
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
return super(SnippetRawView, self).dispatch(request, *args, **kwargs)
|
return super(SnippetRawView, self).dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,12 @@ install_requires =
|
||||||
known_first_party = dpaste
|
known_first_party = dpaste
|
||||||
default_section = THIRDPARTY
|
default_section = THIRDPARTY
|
||||||
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||||
multi_line_output = 0
|
|
||||||
skip = migrations
|
skip = migrations
|
||||||
|
multi_line_output=3
|
||||||
|
include_trailing_comma=True
|
||||||
|
force_grid_wrap=0
|
||||||
|
use_parentheses=True
|
||||||
|
line_length=80
|
||||||
|
|
||||||
[coverage:run]
|
[coverage:run]
|
||||||
source = dpaste
|
source = dpaste
|
||||||
|
|
Loading…
Reference in a new issue