Skip to content

Commit 7a47c7c

Browse files
committed
TEMP: disable struct aliases to check coverage
1 parent 5d94f0a commit 7a47c7c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

kafka/protocol/struct.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ def SCHEMA(self):
1616

1717
ALIASES = {} # for compatibility with new protocol defs from json
1818
def __getattr__(self, name):
19-
if name in self.ALIASES:
19+
if False and name in self.ALIASES:
2020
return getattr(self, self.ALIASES[name])
2121
raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
2222

2323
def __setattr__(self, name, value):
24-
if name in self.ALIASES:
24+
if False and name in self.ALIASES:
2525
name = self.ALIASES[name]
2626
return super().__setattr__(name, value)
2727

@@ -41,9 +41,9 @@ def __init__(self, *args, **kwargs):
4141
if self.SCHEMA.has_tagged_fields():
4242
if kwargs.get('tags') is None:
4343
kwargs['tags'] = {}
44-
for name in self.ALIASES:
45-
if name in kwargs:
46-
kwargs[self.ALIASES[name]] = kwargs.pop(name)
44+
#for name in self.ALIASES:
45+
# if name in kwargs:
46+
# kwargs[self.ALIASES[name]] = kwargs.pop(name)
4747
for name in self.SCHEMA.names:
4848
setattr(self, name, kwargs.pop(name, None))
4949
if kwargs:

0 commit comments

Comments
 (0)