diff --git a/cloudbot/__main__.py b/cloudbot/__main__.py index 5ea99ce3..e0be97f7 100644 --- a/cloudbot/__main__.py +++ b/cloudbot/__main__.py @@ -34,7 +34,6 @@ async def async_main(): # define closure for signal handling # The handler is called with two arguments: the signal number and the current stack frame # These parameters should NOT be removed - # noinspection PyUnusedLocal def exit_gracefully(signum, frame): nonlocal stopped_while_restarting if not _bot: diff --git a/cloudbot/event.py b/cloudbot/event.py index b024cf2c..a503494c 100644 --- a/cloudbot/event.py +++ b/cloudbot/event.py @@ -294,7 +294,6 @@ def ctcp(self, message, ctcp_type, target=None): if not hasattr(self.conn, "ctcp"): raise ValueError("CTCP can only be used on IRC connections") - # noinspection PyUnresolvedReferences self.conn.ctcp(target, ctcp_type, message) def notice(self, message, target=None): diff --git a/cloudbot/util/http.py b/cloudbot/util/http.py index e3ceb4f5..be5e6d24 100644 --- a/cloudbot/util/http.py +++ b/cloudbot/util/http.py @@ -134,7 +134,6 @@ def open_request( return opener.open(request) -# noinspection PyShadowingBuiltins def open( url, query_params=None, diff --git a/plugins/core/core_sieve.py b/plugins/core/core_sieve.py index 9734c5ae..3a9de3c6 100644 --- a/plugins/core/core_sieve.py +++ b/plugins/core/core_sieve.py @@ -20,7 +20,6 @@ def task_clear(): del buckets[uid] -# noinspection PyUnusedLocal @hook.sieve() def check_acls(bot: CloudBot, event: Event, _hook: Hook) -> Optional[Event]: """ @@ -50,7 +49,6 @@ def check_acls(bot: CloudBot, event: Event, _hook: Hook) -> Optional[Event]: return event -# noinspection PyUnusedLocal @hook.sieve() async def perm_sieve( bot: CloudBot, event: Event, _hook: Hook @@ -71,7 +69,6 @@ async def perm_sieve( return event -# noinspection PyUnusedLocal @hook.sieve() def check_disabled( bot: CloudBot, event: CommandEvent, _hook: Hook @@ -88,7 +85,6 @@ def check_disabled( return event -# noinspection PyUnusedLocal @hook.sieve() def rate_limit(bot: CloudBot, event: Event, _hook: Hook) -> Optional[Event]: """ diff --git a/plugins/core/ignore.py b/plugins/core/ignore.py index fddf01b7..7e7b2e83 100644 --- a/plugins/core/ignore.py +++ b/plugins/core/ignore.py @@ -106,7 +106,6 @@ def is_ignored(conn, chan, mask): return False -# noinspection PyUnusedLocal @hook.sieve(priority=50) async def ignore_sieve(bot, event, _hook): # don't block event hooks diff --git a/plugins/core/optout.py b/plugins/core/optout.py index 6400d7d6..7c9de0e0 100644 --- a/plugins/core/optout.py +++ b/plugins/core/optout.py @@ -187,7 +187,6 @@ def load_cache(db): optout_cache.update(new_cache) -# noinspection PyUnusedLocal @hook.sieve(priority=Priority.HIGHEST) def optout_sieve(bot, event, _hook): if not event.chan or not event.conn: diff --git a/plugins/cryptocurrency.py b/plugins/cryptocurrency.py index a4f9b5c1..bf3d7bbc 100644 --- a/plugins/cryptocurrency.py +++ b/plugins/cryptocurrency.py @@ -105,7 +105,6 @@ def __new__(cls, name, bases, members): class Schema(metaclass=SchemaMeta): - # noinspection PyUnusedName _abstract = True _fields = () @@ -149,7 +148,6 @@ def __init__(self, status: ResponseStatus, data: Any = None): class Platform(Schema): - # noinspection PyShadowingBuiltins def __init__( self, id: int, name: str, symbol: str, slug: str, token_address: str ): @@ -193,7 +191,6 @@ def __init__( class CryptoCurrency(Schema): - # noinspection PyShadowingBuiltins def __init__( self, id: int, @@ -237,7 +234,6 @@ def __init__(self, data: Dict[str, CryptoCurrency], status: ResponseStatus): class FiatCurrency(Schema): - # noinspection PyShadowingBuiltins def __init__(self, id: int, name: str, sign: str, symbol: str): super().__init__() self.id = id @@ -257,7 +253,6 @@ def __init__(self, data: List[FiatCurrency], status: ResponseStatus): class CryptoCurrencyEntry(Schema): - # noinspection PyShadowingBuiltins def __init__( self, id: int, diff --git a/plugins/gnomeagainsthumanity.py b/plugins/gnomeagainsthumanity.py index d61247f3..92a02577 100644 --- a/plugins/gnomeagainsthumanity.py +++ b/plugins/gnomeagainsthumanity.py @@ -26,7 +26,6 @@ def CAHblackcard(text): """ - Submit text with _ for the bot to fill in the rest. You can submit text with multiple _""" CardText = text.strip() - # noinspection PyUnusedLocal def blankfiller(matchobj): return random.choice(gnomecards["white"]) diff --git a/plugins/profiling.py b/plugins/profiling.py index f9764ae1..6d792add 100644 --- a/plugins/profiling.py +++ b/plugins/profiling.py @@ -127,7 +127,6 @@ def pympler_diff(): if os.name == "posix": # The handler is called with two arguments: the signal number and the current stack frame # These parameters should NOT be removed - # noinspection PyUnusedLocal def debug(sig, frame): print(get_thread_dump()) diff --git a/tests/core_tests/irc_client_test.py b/tests/core_tests/irc_client_test.py index 7476dff7..561dd6b5 100644 --- a/tests/core_tests/irc_client_test.py +++ b/tests/core_tests/irc_client_test.py @@ -461,7 +461,6 @@ async def test_exc(self, caplog_bot, event_loop): client = await self.make_client(event_loop) runs = 0 - # noinspection PyUnusedLocal async def connect(timeout): nonlocal runs if runs == 5: @@ -524,7 +523,6 @@ async def test_timeout_exc(self, caplog_bot, event_loop): client = await self.make_client(event_loop) runs = 0 - # noinspection PyUnusedLocal async def connect(timeout): nonlocal runs if runs == 5: diff --git a/tests/core_tests/util_tests/test_formatting.py b/tests/core_tests/util_tests/test_formatting.py index 9c6976e1..61a3a2fe 100644 --- a/tests/core_tests/util_tests/test_formatting.py +++ b/tests/core_tests/util_tests/test_formatting.py @@ -141,7 +141,6 @@ def test_truncate_str(): ) -# noinspection PyPep8 def test_truncate_words(): assert ( truncate_words( diff --git a/tests/core_tests/util_tests/test_tokenbucket.py b/tests/core_tests/util_tests/test_tokenbucket.py index f394f0ce..212d3128 100644 --- a/tests/core_tests/util_tests/test_tokenbucket.py +++ b/tests/core_tests/util_tests/test_tokenbucket.py @@ -6,7 +6,6 @@ from cloudbot.util import tokenbucket -# noinspection PyProtectedMember def test_bucket_consume(): bucket = tokenbucket.TokenBucket(10, 5) # larger then capacity @@ -19,7 +18,6 @@ def test_bucket_consume(): assert bucket.consume(10) is False -# noinspection PyProtectedMember def test_bucket_advanced(): bucket = tokenbucket.TokenBucket(10, 1) # tokens start at 10 diff --git a/tests/plugin_tests/core_sieve_test.py b/tests/plugin_tests/core_sieve_test.py index e478d8b1..981ab4d5 100644 --- a/tests/plugin_tests/core_sieve_test.py +++ b/tests/plugin_tests/core_sieve_test.py @@ -8,7 +8,6 @@ from plugins.core import core_sieve -# noinspection PyUnusedFunction @pytest.fixture(autouse=True) def reset_buckets() -> Iterator[None]: """