Remove unnecessary pass statements. (#12206)

This commit is contained in:
Patrick Cloke 2022-03-11 07:06:21 -05:00 committed by GitHub
parent 3b12f6d61b
commit bc9dff1d95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 1 additions and 15 deletions

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

@ -0,0 +1 @@
Remove unnecessary `pass` statements.

View File

@ -371,7 +371,6 @@ class DeviceHandler(DeviceWorkerHandler):
log_kv(
{"reason": "User doesn't have device id.", "device_id": device_id}
)
pass
else:
raise
@ -414,7 +413,6 @@ class DeviceHandler(DeviceWorkerHandler):
# no match
set_tag("error", True)
set_tag("reason", "User doesn't have that device id.")
pass
else:
raise

View File

@ -267,7 +267,6 @@ class BasePresenceHandler(abc.ABC):
is_syncing: Whether or not the user is now 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:
"""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.
"""
pass
async def process_replication_rows(
self, stream_name: str, instance_name: str, token: int, rows: list

View File

@ -120,7 +120,6 @@ class ByteParser(ByteWriteable, Generic[T], abc.ABC):
"""Called when response has finished streaming and the parser should
return the final result (or error).
"""
pass
@attr.s(slots=True, frozen=True, auto_attribs=True)
@ -601,7 +600,6 @@ class MatrixFederationHttpClient:
response.code,
response_phrase,
)
pass
else:
logger.info(
"{%s} [%s] Got response headers: %d %s",

View File

@ -233,7 +233,6 @@ class HttpServer(Protocol):
servlet_classname (str): The name of the handler to be used in prometheus
and opentracing logs.
"""
pass
class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):

View File

@ -298,7 +298,6 @@ class Responder:
Returns:
Resolves once the response has finished being written
"""
pass
def __enter__(self) -> None:
pass

View File

@ -328,7 +328,6 @@ class HomeServer(metaclass=abc.ABCMeta):
Does nothing in this base class; overridden in derived classes to start the
appropriate listeners.
"""
pass
def setup_background_tasks(self) -> None:
"""

View File

@ -48,8 +48,6 @@ class ExternalIDReuseException(Exception):
"""Exception if writing an external id for a user fails,
because this external id is given to an other user."""
pass
@attr.s(frozen=True, slots=True, auto_attribs=True)
class TokenLookupResult:

View File

@ -36,7 +36,6 @@ def run_upgrade(cur, database_engine, config, *args, **kwargs):
config_files = config.appservice.app_service_config_files
except AttributeError:
logger.warning("Could not get app_service_config_files from config")
pass
appservices = load_appservices(config.server.server_name, config_files)

View File

@ -22,8 +22,6 @@ class TreeCacheNode(dict):
leaves.
"""
pass
class TreeCache:
"""

View File

@ -124,7 +124,6 @@ class PasswordCustomAuthProvider:
("m.login.password", ("password",)): self.check_auth,
}
)
pass
def check_auth(self, *args):
return mock_password_provider.check_auth(*args)