Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer committed Aug 5, 2020
1 parent 8193fb3 commit 6592b4c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions webviz_config/_plugin_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ def layout(self):
```
"""

# Class variable used to count number if plugin instances,
# which is again used to give them semi-deterministic IDs.
# For runs with the same webviz configuration the IDs are deterministic,
# which makes it possible to utilize the Dash persistence system.
_number_instances = 0

# This is the default set of buttons to show in the rendered plugin
Expand Down Expand Up @@ -69,7 +65,7 @@ def __init__(self) -> None:
self._plugin_id = self.__class__._plugin_id()

@classmethod
def _plugin_id(cls) -> str:
def _plugin_id(cls) -> int:
WebvizPluginABC._number_instances += 1
return f"{cls.__name__}-{WebvizPluginABC._number_instances}"

Expand Down Expand Up @@ -100,11 +96,7 @@ def layout(self) -> Union[str, Type[Component]]:

@property
def _plugin_wrapper_id(self) -> str:
<<<<<<< HEAD
return f"plugin-wrapper-{self._plugin_uuid}"
=======
return f"plugin-wrapper-{self._plugin_id}"
>>>>>>> Make plugin id semi-deterministic

@property
def plugin_data_output(self) -> Output:
Expand Down

0 comments on commit 6592b4c

Please sign in to comment.