mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-23 23:23:06 +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]
|
||||
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]
|
||||
allow_prereleases = true
|
||||
|
|
|
@ -4,8 +4,11 @@ from textwrap import dedent
|
|||
|
||||
from django.test import TestCase
|
||||
|
||||
from dpaste.highlight import (PlainCodeHighlighter, PygmentsHighlighter,
|
||||
RestructuredTextHighlighter)
|
||||
from dpaste.highlight import (
|
||||
PlainCodeHighlighter,
|
||||
PygmentsHighlighter,
|
||||
RestructuredTextHighlighter,
|
||||
)
|
||||
|
||||
|
||||
class HighlightAPITestCase(TestCase):
|
||||
|
|
|
@ -7,8 +7,8 @@ from django.http import (
|
|||
Http404,
|
||||
HttpResponse,
|
||||
HttpResponseBadRequest,
|
||||
HttpResponseRedirect,
|
||||
HttpResponseForbidden,
|
||||
HttpResponseRedirect,
|
||||
)
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.urls import reverse
|
||||
|
@ -157,9 +157,7 @@ class SnippetRawView(SnippetDetailView):
|
|||
def dispatch(self, request, *args, **kwargs):
|
||||
if not config.RAW_MODE_ENABLED:
|
||||
return HttpResponseForbidden(
|
||||
ugettext(
|
||||
'This dpaste installation has Raw view mode disabled.'
|
||||
)
|
||||
ugettext('This dpaste installation has Raw view mode disabled.')
|
||||
)
|
||||
return super(SnippetRawView, self).dispatch(request, *args, **kwargs)
|
||||
|
||||
|
|
|
@ -49,8 +49,12 @@ install_requires =
|
|||
known_first_party = dpaste
|
||||
default_section = THIRDPARTY
|
||||
sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
|
||||
multi_line_output = 0
|
||||
skip = migrations
|
||||
multi_line_output=3
|
||||
include_trailing_comma=True
|
||||
force_grid_wrap=0
|
||||
use_parentheses=True
|
||||
line_length=80
|
||||
|
||||
[coverage:run]
|
||||
source = dpaste
|
||||
|
|
Loading…
Reference in a new issue