Skip to content

Commit 57e4d71

Browse files
committed
Fix and allow classes with missing metaclasses
1 parent 7394602 commit 57e4d71

File tree

12 files changed

+1134
-2
lines changed

12 files changed

+1134
-2
lines changed

stubs/SQLAlchemy/@tests/stubtest_allowlist.txt

Lines changed: 1047 additions & 0 deletions
Large diffs are not rendered by default.

stubs/aiofiles/@tests/stubtest_allowlist.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.isatty
5757
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.rollover
5858
aiofiles.tempfile.temptypes.AsyncSpooledTemporaryFile.tell
5959
aiofiles.tempfile.temptypes.AsyncTemporaryDirectory.cleanup
60+
61+
# Metaclass differs:
62+
iofiles.base.AiofilesContextManager
63+
aiofiles.tempfile.AiofilesContextManagerTempDir

stubs/cryptography/METADATA.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
version = "3.3.*"
22
obsolete_since = "3.4.4"
3+
4+
[tool.stubtest]
5+
# See https://github.com/python/typeshed/issues/9127
6+
skip = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Metaclass differs:
2+
invoke.parser.ParseMachine
3+
invoke.parser.parser.ParseMachine

stubs/jmespath/jmespath/functions.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def signature(*arguments: _Signature) -> Callable[[_F], _F]: ...
1616
class FunctionRegistry(type):
1717
def __init__(cls, name, bases, attrs) -> None: ...
1818

19-
class Functions:
19+
class Functions(metaclass=FunctionRegistry):
2020
FUNCTION_TABLE: Any
2121
def call_function(self, function_name, resolved_args): ...

stubs/peewee/peewee.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ class _BoundModelsContext(_callable_context_manager):
15461546
def __enter__(self): ...
15471547
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
15481548

1549-
class Model:
1549+
class Model(metaclass=ModelBase):
15501550
__data__: Incomplete
15511551
__rel__: Incomplete
15521552
def __init__(self, *args, **kwargs) -> None: ...

stubs/protobuf/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ google.protobuf.descriptor.ServiceDescriptor.__new__
3333
# Set to None at runtime - which doesn't match the Sequence base class.
3434
# It's a hack - just allow it.
3535
google.protobuf.internal.containers.BaseContainer.__hash__
36+
37+
# Metaclass differs:
38+
google.protobuf.descriptor.OneofDescriptor

stubs/python-dateutil/@tests/stubtest_allowlist.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ dateutil.tz.tz.tzoffset.instance
55
dateutil.tz.tz.tzstr.instance
66
dateutil.tz.tzoffset.instance
77
dateutil.tz.tzstr.instance
8+
9+
# Metaclass differs:
10+
dateutil.tz.tzoffset
11+
dateutil.tz.tzutc
12+
dateutil.tz.tz.tzoffset
13+
dateutil.tz.tz.tzutc

stubs/redis/@tests/stubtest_allowlist.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,58 @@ redis.asyncio.sentinel.Sentinel.master_for
1616
redis.asyncio.sentinel.Sentinel.slave_for
1717
redis.sentinel.Sentinel.master_for
1818
redis.sentinel.Sentinel.slave_for
19+
20+
# Metaclass differs:
21+
redis.RedisCluster
22+
redis.asyncio.Redis
23+
redis.asyncio.client.MonitorCommandInfo
24+
redis.asyncio.client.Pipeline
25+
redis.asyncio.client.Redis
26+
redis.asyncio.connection.ConnectKwargs
27+
redis.client.Pipeline
28+
redis.client.Redis
29+
redis.cluster.ClusterPipeline
30+
redis.cluster.RedisCluster
31+
redis.commands.AsyncCoreCommands
32+
redis.commands.CoreCommands
33+
redis.commands.RedisClusterCommands
34+
redis.commands.cluster.ClusterDataAccessCommands
35+
redis.commands.cluster.ClusterManagementCommands
36+
redis.commands.cluster.ClusterMultiKeyCommands
37+
redis.commands.cluster.RedisClusterCommands
38+
redis.commands.core.ACLCommands
39+
redis.commands.core.AsyncACLCommands
40+
redis.commands.core.AsyncBasicKeyCommands
41+
redis.commands.core.AsyncClusterCommands
42+
redis.commands.core.AsyncCoreCommands
43+
redis.commands.core.AsyncDataAccessCommands
44+
redis.commands.core.AsyncGeoCommands
45+
redis.commands.core.AsyncHashCommands
46+
redis.commands.core.AsyncHyperlogCommands
47+
redis.commands.core.AsyncListCommands
48+
redis.commands.core.AsyncManagementCommands
49+
redis.commands.core.AsyncModuleCommands
50+
redis.commands.core.AsyncPubSubCommands
51+
redis.commands.core.AsyncScanCommands
52+
redis.commands.core.AsyncScriptCommands
53+
redis.commands.core.AsyncSetCommands
54+
redis.commands.core.AsyncSortedSetCommands
55+
redis.commands.core.AsyncStreamCommands
56+
redis.commands.core.BasicKeyCommands
57+
redis.commands.core.ClusterCommands
58+
redis.commands.core.CoreCommands
59+
redis.commands.core.DataAccessCommands
60+
redis.commands.core.GeoCommands
61+
redis.commands.core.HashCommands
62+
redis.commands.core.HyperlogCommands
63+
redis.commands.core.ListCommands
64+
redis.commands.core.ManagementCommands
65+
redis.commands.core.ModuleCommands
66+
redis.commands.core.PubSubCommands
67+
redis.commands.core.ScanCommands
68+
redis.commands.core.ScriptCommands
69+
redis.commands.core.SetCommands
70+
redis.commands.core.SortedSetCommands
71+
redis.commands.core.StreamCommands
72+
redis.commands.json.Pipeline
73+
redis.commands.timeseries.Pipeline

stubs/requests/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ requests.packages.target
3838
requests.charset_normalizer_version
3939
requests.chardet_version
4040
requests.utils.HEADER_VALIDATORS
41+
42+
# Metaclass differs:
43+
requests.adapters.Retry
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
tqdm.contrib.discord
2+
3+
# Metaclass differs:
4+
tqdm.rich.FractionColumn
5+
tqdm.rich.RateColumn

stubs/urllib3/@tests/stubtest_allowlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ urllib3.util.connection.poll
2828
urllib3.util.connection.select
2929
urllib3.util.ssl_.create_default_context
3030
urllib3.util.ssl_.ssl_wrap_socket
31+
32+
# Metaclass differs:
33+
urllib3.util.retry.Retry

0 commit comments

Comments
 (0)