From de2c1e1a8d15dce4b3eae84bf619aa19c69056ed Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Sun, 20 Sep 2020 15:40:42 +0200 Subject: [PATCH] Make __all__ a list of strings This fixes mypy from producing this error: ``` $ stubgen -m txredisapi Traceback (most recent call last): File ".../.venv/bin/stubgen", line 8, in sys.exit(main()) File "mypy/stubgen.py", line 1564, in main File "mypy/stubgen.py", line 1442, in generate_stubs File "mypy/stubgen.py", line 1385, in generate_stub_from_ast File "mypy/stubgen.py", line 515, in __init__ TypeError: str object expected; got function ``` --- txredisapi.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/txredisapi.py b/txredisapi.py index d7f8e4f..a9b7cee 100644 --- a/txredisapi.py +++ b/txredisapi.py @@ -2794,15 +2794,15 @@ def slave_for(self, service_name, factory_class=SentinelConnectionFactory, __all__ = [ - Connection, lazyConnection, - ConnectionPool, lazyConnectionPool, - ShardedConnection, lazyShardedConnection, - ShardedConnectionPool, lazyShardedConnectionPool, - UnixConnection, lazyUnixConnection, - UnixConnectionPool, lazyUnixConnectionPool, - ShardedUnixConnection, lazyShardedUnixConnection, - ShardedUnixConnectionPool, lazyShardedUnixConnectionPool, - Sentinel, MasterNotFoundError + "Connection", "lazyConnection", + "ConnectionPool", "lazyConnectionPool", + "ShardedConnection", "lazyShardedConnection", + "ShardedConnectionPool", "lazyShardedConnectionPool", + "UnixConnection", "lazyUnixConnection", + "UnixConnectionPool", "lazyUnixConnectionPool", + "ShardedUnixConnection", "lazyShardedUnixConnection", + "ShardedUnixConnectionPool", "lazyShardedUnixConnectionPool", + "Sentinel", "MasterNotFoundError" ] __author__ = "Alexandre Fiori"