From cf923b49d33be043e95a200342db458aa6e4c353 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 1 May 2020 21:24:26 -0700 Subject: [PATCH] python: Remove extra pass statements with autoflake. Signed-off-by: Anders Kaseorg --- zerver/lib/import_realm.py | 2 -- zerver/lib/rate_limiter.py | 1 - zerver/lib/test_runner.py | 1 - zproject/backends.py | 1 - 4 files changed, 5 deletions(-) diff --git a/zerver/lib/import_realm.py b/zerver/lib/import_realm.py index 38a16a0036..d376be7b7d 100644 --- a/zerver/lib/import_realm.py +++ b/zerver/lib/import_realm.py @@ -225,7 +225,6 @@ class FakeMessage: We just need a stub object for do_render_markdown to write stuff to. ''' - pass def fix_message_rendered_content(realm: Realm, sender_map: Dict[int, Record], @@ -416,7 +415,6 @@ def re_map_foreign_keys_internal(data_table: List[Record], # subscription object # check function 'get_huddles_from_subscription' ID_MAP['recipient_to_huddle_map'][item['id']] = lookup_table[old_id] - pass else: continue old_id = item[field_name] diff --git a/zerver/lib/rate_limiter.py b/zerver/lib/rate_limiter.py index 91748f785e..867bb4fd22 100644 --- a/zerver/lib/rate_limiter.py +++ b/zerver/lib/rate_limiter.py @@ -153,7 +153,6 @@ class RateLimiterBackend(ABC): @abstractmethod def block_access(cls, entity_key: str, seconds: int) -> None: "Manually blocks an entity for the desired number of seconds" - pass @classmethod @abstractmethod diff --git a/zerver/lib/test_runner.py b/zerver/lib/test_runner.py index f160600659..edac98fc30 100644 --- a/zerver/lib/test_runner.py +++ b/zerver/lib/test_runner.py @@ -477,7 +477,6 @@ class Runner(DiscoverRunner): shutil.rmtree(TEST_RUN_DIR) except OSError: print("Unable to clean up the test run's directory.") - pass return super().teardown_test_environment(*args, **kwargs) def test_imports(self, test_labels: List[str], suite: Union[TestSuite, ParallelTestSuite]) -> None: diff --git a/zproject/backends.py b/zproject/backends.py index e4df33b084..bbfd97c4a5 100644 --- a/zproject/backends.py +++ b/zproject/backends.py @@ -367,7 +367,6 @@ ldap_logger = logging.getLogger("zulip.ldap") class ZulipLDAPException(_LDAPUser.AuthenticationFailed): """Since this inherits from _LDAPUser.AuthenticationFailed, these will be caught and logged at debug level inside django-auth-ldap's authenticate()""" - pass class ZulipLDAPExceptionNoMatchingLDAPUser(ZulipLDAPException): pass