General: Small code cleanups (#5034)

* make sure the message type is set and unset correctly

* Update dummy data in readme

* remove debug message from main thread callbacks

* removed unused import

* cleanup code in muster addon

* simplified 'get_publish_instance_label' function

* even better json file handling

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>

---------

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
Jakub Trllo 2023-05-26 14:44:47 +02:00 committed by GitHub
parent 5f98c27836
commit 6843ae8532
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 39 deletions

View file

@ -872,7 +872,6 @@ class WrappedCallbackItem:
self.log.warning("- item is already processed")
return
self.log.debug("Running callback: {}".format(str(self._callback)))
try:
result = self._callback(*self._args, **self._kwargs)
self._result = result

View file

@ -127,8 +127,7 @@ class OverlayMessageWidget(QtWidgets.QFrame):
if timeout:
self._timeout_timer.setInterval(timeout)
if message_type:
set_style_property(self, "type", message_type)
set_style_property(self, "type", message_type)
self._timeout_timer.start()