ivandasch commented on a change in pull request #2:
URL:
https://github.com/apache/ignite-python-thin-client/pull/2#discussion_r560804092
##########
File path: pyignite/binary.py
##########
@@ -76,20 +69,23 @@ def schema_id(self) -> int:
def __new__(cls, *args, **kwargs) -> Any:
# allow all items in Binary Object schema to be populated as optional
# arguments to `__init__()` with sensible defaults.
- if cls is not GenericObjectMeta:
- attributes = {
- k: attr.ib(
- type=getattr(v, 'pythonic', type(None)),
- default=getattr(v, 'default', None),
- ) for k, v in cls.schema.items()
- }
- attributes.update({'version': attr.ib(type=int, default=1)})
- cls = attr.s(cls, these=attributes)
+ attributes = {
Review comment:
I think that dict comprehension is not suitable here.
```
attributes = {}
for k,v in cls.schema.items():
attributes[k] = attr.ib(type=getattr(v, 'pythonic', type(None)),
default=getattr(v, 'default', None))
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]