mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
check isort by travis
This commit is contained in:
parent
8a4f05fefb
commit
4a27000548
@ -23,6 +23,9 @@ matrix:
|
|||||||
- python: 3.6
|
- python: 3.6
|
||||||
env: TOX_ENV=py36
|
env: TOX_ENV=py36
|
||||||
|
|
||||||
|
- python: 3.6
|
||||||
|
env: TOX_ENV=isort
|
||||||
|
|
||||||
- python: 3.6
|
- python: 3.6
|
||||||
env: TOX_ENV=check-newsfragment
|
env: TOX_ENV=check-newsfragment
|
||||||
|
|
||||||
|
1
changelog.d/3540.misc
Normal file
1
changelog.d/3540.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
check isort for each PR
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
from ._base import Config
|
from ._base import Config
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_CONFIG = """\
|
DEFAULT_CONFIG = """\
|
||||||
# User Consent configuration
|
# User Consent configuration
|
||||||
#
|
#
|
||||||
|
@ -29,6 +29,7 @@ from synapse.util.versionstring import get_version_string
|
|||||||
|
|
||||||
from ._base import Config
|
from ._base import Config
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_LOG_CONFIG = Template("""
|
DEFAULT_LOG_CONFIG = Template("""
|
||||||
version: 1
|
version: 1
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ from synapse.types import UserID
|
|||||||
|
|
||||||
from ._base import Config
|
from ._base import Config
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_CONFIG = """\
|
DEFAULT_CONFIG = """\
|
||||||
# Server Notices room configuration
|
# Server Notices room configuration
|
||||||
#
|
#
|
||||||
|
@ -26,9 +26,11 @@ from OpenSSL.SSL import VERIFY_NONE
|
|||||||
from twisted.internet import defer, protocol, reactor, ssl, task
|
from twisted.internet import defer, protocol, reactor, ssl, task
|
||||||
from twisted.internet.endpoints import HostnameEndpoint, wrapClientTLS
|
from twisted.internet.endpoints import HostnameEndpoint, wrapClientTLS
|
||||||
from twisted.web._newclient import ResponseDone
|
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 FileBodyProducer as TwistedFileBodyProducer
|
||||||
from twisted.web.client import (
|
from twisted.web.client import (
|
||||||
|
Agent,
|
||||||
|
BrowserLikeRedirectAgent,
|
||||||
|
ContentDecoderAgent,
|
||||||
GzipDecoder,
|
GzipDecoder,
|
||||||
HTTPConnectionPool,
|
HTTPConnectionPool,
|
||||||
PartialDownloadError,
|
PartialDownloadError,
|
||||||
|
@ -20,7 +20,7 @@ from twisted.web.server import Request, Site
|
|||||||
|
|
||||||
from synapse.http import redact_uri
|
from synapse.http import redact_uri
|
||||||
from synapse.http.request_metrics import RequestMetrics
|
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__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -15,11 +15,21 @@
|
|||||||
|
|
||||||
from synapse.http.server import JsonResource
|
from synapse.http.server import JsonResource
|
||||||
from synapse.rest.client import versions
|
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 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 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 (
|
from synapse.rest.client.v2_alpha import (
|
||||||
account,
|
account,
|
||||||
account_data,
|
account_data,
|
||||||
|
@ -24,9 +24,9 @@ from synapse.api.constants import Membership
|
|||||||
from synapse.api.errors import AuthError, Codes, NotFoundError, SynapseError
|
from synapse.api.errors import AuthError, Codes, NotFoundError, SynapseError
|
||||||
from synapse.http.servlet import (
|
from synapse.http.servlet import (
|
||||||
assert_params_in_dict,
|
assert_params_in_dict,
|
||||||
parse_json_object_from_request,
|
|
||||||
parse_integer,
|
parse_integer,
|
||||||
parse_string
|
parse_json_object_from_request,
|
||||||
|
parse_string,
|
||||||
)
|
)
|
||||||
from synapse.types import UserID, create_requester
|
from synapse.types import UserID, create_requester
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
|
||||||
from synapse.streams.config import PaginationConfig
|
|
||||||
from synapse.http.servlet import parse_boolean
|
from synapse.http.servlet import parse_boolean
|
||||||
|
from synapse.streams.config import PaginationConfig
|
||||||
|
|
||||||
from .base import ClientV1RestServlet, client_path_patterns
|
from .base import ClientV1RestServlet, client_path_patterns
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ from twisted.internet import defer
|
|||||||
|
|
||||||
from synapse.api import errors
|
from synapse.api import errors
|
||||||
from synapse.http.servlet import (
|
from synapse.http.servlet import (
|
||||||
|
RestServlet,
|
||||||
assert_params_in_dict,
|
assert_params_in_dict,
|
||||||
parse_json_object_from_request,
|
parse_json_object_from_request,
|
||||||
RestServlet
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from ._base import client_v2_patterns, interactive_auth_handler
|
from ._base import client_v2_patterns, interactive_auth_handler
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
from pydenticon import Generator
|
from pydenticon import Generator
|
||||||
|
|
||||||
from synapse.http.servlet import parse_integer
|
|
||||||
|
|
||||||
from twisted.web.resource import Resource
|
from twisted.web.resource import Resource
|
||||||
|
|
||||||
|
from synapse.http.servlet import parse_integer
|
||||||
|
|
||||||
FOREGROUND = [
|
FOREGROUND = [
|
||||||
"rgb(45,79,255)",
|
"rgb(45,79,255)",
|
||||||
"rgb(254,180,44)",
|
"rgb(254,180,44)",
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
from synapse.storage.engines import PostgresEngine
|
from synapse.storage.engines import PostgresEngine
|
||||||
from synapse.storage.prepare_database import get_statements
|
from synapse.storage.prepare_database import get_statements
|
||||||
|
|
||||||
|
|
||||||
FIX_INDEXES = """
|
FIX_INDEXES = """
|
||||||
-- rebuild indexes as uniques
|
-- rebuild indexes as uniques
|
||||||
DROP INDEX groups_invites_g_idx;
|
DROP INDEX groups_invites_g_idx;
|
||||||
|
6
tox.ini
6
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = packaging, py27, py36, pep8
|
envlist = packaging, py27, py36, pep8, isort
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps =
|
deps =
|
||||||
@ -103,6 +103,10 @@ deps =
|
|||||||
flake8
|
flake8
|
||||||
commands = /bin/sh -c "flake8 synapse tests {env:PEP8SUFFIX:}"
|
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]
|
[testenv:check-newsfragment]
|
||||||
skip_install = True
|
skip_install = True
|
||||||
|
Loading…
Reference in New Issue
Block a user