Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#564: fixed missed initialization of object n-d index #565

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/lbaf/Model/lbsObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from .lbsBlock import Block
from .lbsObjectCommunicator import ObjectCommunicator

class Object:

Check notice on line 48 in src/lbaf/Model/lbsObject.py

View workflow job for this annotation

GitHub Actions / code-quality (ubuntu-latest, 3.8)

Too many instance attributes (13/7) (too-many-instance-attributes)

Check notice on line 48 in src/lbaf/Model/lbsObject.py

View workflow job for this annotation

GitHub Actions / code-quality (ubuntu-latest, 3.8)

Too many public methods (28/20) (too-many-public-methods)
"""A class representing an object with load and communicator

Constructor arguments:
Expand All @@ -61,7 +61,7 @@
:arg index: the n-dimensional index for an object that belongs to a collection
"""

def __init__(

Check notice on line 64 in src/lbaf/Model/lbsObject.py

View workflow job for this annotation

GitHub Actions / code-quality (ubuntu-latest, 3.8)

Too many arguments (11/7) (too-many-arguments)

Check notice on line 64 in src/lbaf/Model/lbsObject.py

View workflow job for this annotation

GitHub Actions / code-quality (ubuntu-latest, 3.8)

Too many branches (14/12) (too-many-branches)
self,
seq_id: Optional[int] = None,
packed_id: Optional[int] = None,
Expand Down Expand Up @@ -124,6 +124,7 @@

# collection_id is not used in LBAF but is required for migratable objects in vt
self.__collection_id = collection_id
self.__index = index

# Retrieve and set optionally defined fields
if isinstance(user_defined, dict) or user_defined is None:
Expand Down Expand Up @@ -153,9 +154,6 @@
else:
raise TypeError(f"subphases: {subphases} is of type {type(subphases)} but must be <class 'list'>")

if index is not None:
self.__index = index

def __repr__(self):
return f"Object id: {self.get_id()}, load: {self.__load}"

Expand Down
Loading