Merge pull request #3540 from krombel/enforce_isort

check isort by travis
pull/3543/head
Amber Brown 2018-07-17 13:41:59 +10:00 committed by GitHub
commit fe10dd9fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 9 deletions

View File

@ -23,6 +23,9 @@ matrix:
- python: 3.6
env: TOX_ENV=py36
- python: 3.6
env: TOX_ENV=check_isort
- python: 3.6
env: TOX_ENV=check-newsfragment

1
changelog.d/3540.misc Normal file
View File

@ -0,0 +1 @@
check isort for each PR

View File

@ -20,7 +20,7 @@ from twisted.web.server import Request, Site
from synapse.http import redact_uri
from synapse.http.request_metrics import RequestMetrics
from synapse.util.logcontext import LoggingContext, ContextResourceUsage
from synapse.util.logcontext import ContextResourceUsage, LoggingContext
logger = logging.getLogger(__name__)

View File

@ -24,9 +24,9 @@ from synapse.api.constants import Membership
from synapse.api.errors import AuthError, Codes, NotFoundError, SynapseError
from synapse.http.servlet import (
assert_params_in_dict,
parse_json_object_from_request,
parse_integer,
parse_string
parse_json_object_from_request,
parse_string,
)
from synapse.types import UserID, create_requester

View File

@ -15,8 +15,8 @@
from twisted.internet import defer
from synapse.streams.config import PaginationConfig
from synapse.http.servlet import parse_boolean
from synapse.streams.config import PaginationConfig
from .base import ClientV1RestServlet, client_path_patterns

View File

@ -19,9 +19,9 @@ from twisted.internet import defer
from synapse.api import errors
from synapse.http.servlet import (
RestServlet,
assert_params_in_dict,
parse_json_object_from_request,
RestServlet
)
from ._base import client_v2_patterns, interactive_auth_handler

View File

@ -14,10 +14,10 @@
from pydenticon import Generator
from synapse.http.servlet import parse_integer
from twisted.web.resource import Resource
from synapse.http.servlet import parse_integer
FOREGROUND = [
"rgb(45,79,255)",
"rgb(254,180,44)",

View File

@ -1,5 +1,5 @@
[tox]
envlist = packaging, py27, py36, pep8
envlist = packaging, py27, py36, pep8, check_isort
[testenv]
deps =
@ -103,10 +103,14 @@ deps =
flake8
commands = /bin/sh -c "flake8 synapse tests {env:PEP8SUFFIX:}"
[testenv:check_isort]
skip_install = True
deps = isort
commands = /bin/sh -c "isort -c -sp setup.cfg -rc synapse tests"
[testenv:check-newsfragment]
skip_install = True
deps = towncrier>=18.6.0rc1
commands =
python -m towncrier.check --compare-with=origin/develop
basepython = python3.6
basepython = python3.6