Skip to content

Commit

Permalink
backend, model: remove calls to trivial super().__init__() methods
Browse files Browse the repository at this point in the history
These are unsafe, according to mypy:
error: Call to abstract method "__init__" of "DataSpecificationContent" with trivial body via super() is unsafe  [safe-super]
  • Loading branch information
jkhsjdhjs authored and s-heppner committed May 10, 2024
1 parent 971d99a commit ecf4c13
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion basyx/aas/backend/couchdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ def __init__(self, url: str, database: str):
:param url: URL to the CouchDB
:param database: Name of the Database inside the CouchDB
"""
super().__init__()
self.url: str = url
self.database_name: str = database

Expand Down
1 change: 0 additions & 1 deletion basyx/aas/backend/local_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def __init__(self, directory_path: str):
:param directory_path: Path to the local file backend (the path where you want to store your AAS JSON files)
"""
super().__init__()
self.directory_path: str = directory_path.rstrip("/")

# A dictionary of weak references to local replications of stored objects. Objects are kept in this cache as
Expand Down
1 change: 0 additions & 1 deletion basyx/aas/model/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,6 @@ def __init__(self,
value: Optional[ValueTypeIEC61360] = None,
level_types: Iterable[IEC61360LevelType] = ()):

super().__init__()
self.preferred_name: PreferredNameTypeIEC61360 = preferred_name
self.short_name: Optional[ShortNameTypeIEC61360] = short_name
self.data_type: Optional[DataTypeIEC61360] = data_type
Expand Down
1 change: 0 additions & 1 deletion basyx/aas/model/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class DictObjectStore(AbstractObjectStore[_IT], Generic[_IT]):
:class:`~basyx.aas.model.base.Identifier` → :class:`~basyx.aas.model.base.Identifiable`
"""
def __init__(self, objects: Iterable[_IT] = ()) -> None:
super().__init__()
self._backend: Dict[Identifier, _IT] = {}
for x in objects:
self.add(x)
Expand Down

0 comments on commit ecf4c13

Please sign in to comment.