mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 22:13:52 +01:00
Remove unnecessary pass statements. (#12206)
This commit is contained in:
parent
3b12f6d61b
commit
bc9dff1d95
11 changed files with 1 additions and 15 deletions
1
changelog.d/12206.misc
Normal file
1
changelog.d/12206.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Remove unnecessary `pass` statements.
|
|
@ -371,7 +371,6 @@ class DeviceHandler(DeviceWorkerHandler):
|
||||||
log_kv(
|
log_kv(
|
||||||
{"reason": "User doesn't have device id.", "device_id": device_id}
|
{"reason": "User doesn't have device id.", "device_id": device_id}
|
||||||
)
|
)
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
@ -414,7 +413,6 @@ class DeviceHandler(DeviceWorkerHandler):
|
||||||
# no match
|
# no match
|
||||||
set_tag("error", True)
|
set_tag("error", True)
|
||||||
set_tag("reason", "User doesn't have that device id.")
|
set_tag("reason", "User doesn't have that device id.")
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,6 @@ class BasePresenceHandler(abc.ABC):
|
||||||
is_syncing: Whether or not the user is now syncing
|
is_syncing: Whether or not the user is now syncing
|
||||||
sync_time_msec: Time in ms when the user was last syncing
|
sync_time_msec: Time in ms when the user was last syncing
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
async def update_external_syncs_clear(self, process_id: str) -> None:
|
async def update_external_syncs_clear(self, process_id: str) -> None:
|
||||||
"""Marks all users that had been marked as syncing by a given process
|
"""Marks all users that had been marked as syncing by a given process
|
||||||
|
@ -277,7 +276,6 @@ class BasePresenceHandler(abc.ABC):
|
||||||
|
|
||||||
This is a no-op when presence is handled by a different worker.
|
This is a no-op when presence is handled by a different worker.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
async def process_replication_rows(
|
async def process_replication_rows(
|
||||||
self, stream_name: str, instance_name: str, token: int, rows: list
|
self, stream_name: str, instance_name: str, token: int, rows: list
|
||||||
|
|
|
@ -120,7 +120,6 @@ class ByteParser(ByteWriteable, Generic[T], abc.ABC):
|
||||||
"""Called when response has finished streaming and the parser should
|
"""Called when response has finished streaming and the parser should
|
||||||
return the final result (or error).
|
return the final result (or error).
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s(slots=True, frozen=True, auto_attribs=True)
|
@attr.s(slots=True, frozen=True, auto_attribs=True)
|
||||||
|
@ -601,7 +600,6 @@ class MatrixFederationHttpClient:
|
||||||
response.code,
|
response.code,
|
||||||
response_phrase,
|
response_phrase,
|
||||||
)
|
)
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
logger.info(
|
logger.info(
|
||||||
"{%s} [%s] Got response headers: %d %s",
|
"{%s} [%s] Got response headers: %d %s",
|
||||||
|
|
|
@ -233,7 +233,6 @@ class HttpServer(Protocol):
|
||||||
servlet_classname (str): The name of the handler to be used in prometheus
|
servlet_classname (str): The name of the handler to be used in prometheus
|
||||||
and opentracing logs.
|
and opentracing logs.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):
|
class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):
|
||||||
|
|
|
@ -298,7 +298,6 @@ class Responder:
|
||||||
Returns:
|
Returns:
|
||||||
Resolves once the response has finished being written
|
Resolves once the response has finished being written
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
def __enter__(self) -> None:
|
def __enter__(self) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -328,7 +328,6 @@ class HomeServer(metaclass=abc.ABCMeta):
|
||||||
Does nothing in this base class; overridden in derived classes to start the
|
Does nothing in this base class; overridden in derived classes to start the
|
||||||
appropriate listeners.
|
appropriate listeners.
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
def setup_background_tasks(self) -> None:
|
def setup_background_tasks(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -48,8 +48,6 @@ class ExternalIDReuseException(Exception):
|
||||||
"""Exception if writing an external id for a user fails,
|
"""Exception if writing an external id for a user fails,
|
||||||
because this external id is given to an other user."""
|
because this external id is given to an other user."""
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s(frozen=True, slots=True, auto_attribs=True)
|
@attr.s(frozen=True, slots=True, auto_attribs=True)
|
||||||
class TokenLookupResult:
|
class TokenLookupResult:
|
||||||
|
|
|
@ -36,7 +36,6 @@ def run_upgrade(cur, database_engine, config, *args, **kwargs):
|
||||||
config_files = config.appservice.app_service_config_files
|
config_files = config.appservice.app_service_config_files
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
logger.warning("Could not get app_service_config_files from config")
|
logger.warning("Could not get app_service_config_files from config")
|
||||||
pass
|
|
||||||
|
|
||||||
appservices = load_appservices(config.server.server_name, config_files)
|
appservices = load_appservices(config.server.server_name, config_files)
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@ class TreeCacheNode(dict):
|
||||||
leaves.
|
leaves.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class TreeCache:
|
class TreeCache:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -124,7 +124,6 @@ class PasswordCustomAuthProvider:
|
||||||
("m.login.password", ("password",)): self.check_auth,
|
("m.login.password", ("password",)): self.check_auth,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
pass
|
|
||||||
|
|
||||||
def check_auth(self, *args):
|
def check_auth(self, *args):
|
||||||
return mock_password_provider.check_auth(*args)
|
return mock_password_provider.check_auth(*args)
|
||||||
|
|
Loading…
Reference in a new issue