Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
check isort by travis
Browse files Browse the repository at this point in the history
  • Loading branch information
krombel committed Jul 16, 2018
1 parent 8a4f05f commit 4a27000
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ matrix:
- python: 3.6
env: TOX_ENV=py36

- python: 3.6
env: TOX_ENV=isort

- python: 3.6
env: TOX_ENV=check-newsfragment

Expand Down
1 change: 1 addition & 0 deletions changelog.d/3540.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
check isort for each PR
1 change: 1 addition & 0 deletions synapse/config/consent_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from ._base import Config


DEFAULT_CONFIG = """\
# User Consent configuration
#
Expand Down
1 change: 1 addition & 0 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

from ._base import Config


DEFAULT_LOG_CONFIG = Template("""
version: 1
Expand Down
1 change: 1 addition & 0 deletions synapse/config/server_notices_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from ._base import Config


DEFAULT_CONFIG = """\
# Server Notices room configuration
#
Expand Down
4 changes: 3 additions & 1 deletion synapse/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
from twisted.internet import defer, protocol, reactor, ssl, task
from twisted.internet.endpoints import HostnameEndpoint, wrapClientTLS
from twisted.web._newclient import ResponseDone
from twisted.web.client import Agent, BrowserLikeRedirectAgent, ContentDecoderAgent
from twisted.web.client import FileBodyProducer as TwistedFileBodyProducer
from twisted.web.client import (
Agent,
BrowserLikeRedirectAgent,
ContentDecoderAgent,
GzipDecoder,
HTTPConnectionPool,
PartialDownloadError,
Expand Down
2 changes: 1 addition & 1 deletion synapse/http/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

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__)

Expand Down
16 changes: 13 additions & 3 deletions synapse/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@

from synapse.http.server import JsonResource
from synapse.rest.client import versions
from synapse.rest.client.v1 import admin, directory, events, initial_sync
from synapse.rest.client.v1 import login as v1_login
from synapse.rest.client.v1 import logout, presence, profile, push_rule, pusher
from synapse.rest.client.v1 import register as v1_register
from synapse.rest.client.v1 import room, voip
from synapse.rest.client.v1 import (
admin,
directory,
events,
initial_sync,
logout,
presence,
profile,
push_rule,
pusher,
room,
voip,
)
from synapse.rest.client.v2_alpha import (
account,
account_data,
Expand Down
4 changes: 2 additions & 2 deletions synapse/rest/client/v1/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
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

Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/v1/initial_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/v2_alpha/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

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
Expand Down
4 changes: 2 additions & 2 deletions synapse/rest/media/v1/identicon_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
1 change: 1 addition & 0 deletions synapse/storage/schema/delta/48/group_unique_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from synapse.storage.engines import PostgresEngine
from synapse.storage.prepare_database import get_statements


FIX_INDEXES = """
-- rebuild indexes as uniques
DROP INDEX groups_invites_g_idx;
Expand Down
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = packaging, py27, py36, pep8
envlist = packaging, py27, py36, pep8, isort

[testenv]
deps =
Expand Down Expand Up @@ -103,10 +103,14 @@ deps =
flake8
commands = /bin/sh -c "flake8 synapse tests {env:PEP8SUFFIX:}"

[testenv: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

0 comments on commit 4a27000

Please sign in to comment.