[style] codestyle fixes
This commit is contained in:
parent
d77b0b9e9a
commit
703b647321
@ -1,6 +1,7 @@
|
||||
from nixview.data_models.tree_model import NixTreeItem
|
||||
from PyQt5.QtCore import QObject, pyqtSignal
|
||||
|
||||
|
||||
class Communicate(QObject):
|
||||
"""
|
||||
Small class for across app communication. Defines signals, to which other classes can connect.
|
||||
@ -11,4 +12,5 @@ class Communicate(QObject):
|
||||
|
||||
plot_error = pyqtSignal(str)
|
||||
|
||||
|
||||
communicator = Communicate()
|
@ -20,12 +20,13 @@ ICONS_PATHS = glob.glob(os.path.join(ICONS_FOLDER, "*.png"))
|
||||
ICONS_PATHS.extend(glob.glob(os.path.join(ICONS_FOLDER, "*.icns")))
|
||||
ICONS_PATHS = sorted(ICONS_PATHS)
|
||||
ICON_DICT = {}
|
||||
|
||||
for icon in ICONS_PATHS:
|
||||
ICON_DICT[icon.split(os.sep)[-1].split(".")[0]] = icon
|
||||
|
||||
|
||||
def get_icon(name):
|
||||
if name in ICON_DICT.keys():
|
||||
return QIcon(ICON_DICT[name])
|
||||
else:
|
||||
return QIcon("nix_logo.png")
|
||||
|
||||
|
@ -4,6 +4,7 @@ from PyQt5.QtWidgets import QApplication
|
||||
from nixview.ui.mainwindow import NixView
|
||||
import argparse
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="NixView. Viewer for NIX data files. For more on nix see https://nixio.readthedocs.io/en/master")
|
||||
parser.add_argument("file", nargs="?", default="", type=str, help="The nix file that should be opened.")
|
||||
@ -17,5 +18,6 @@ def main():
|
||||
window.show()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
@ -1,8 +1,11 @@
|
||||
import os
|
||||
import datetime as dt
|
||||
|
||||
|
||||
class ItemDescriptor():
|
||||
def __init__(self, name=None, id=None, type=None, value=None, unit=None, label=None, definition=None, block_id=None, entity_type=None, shape=None, metadata=None, data_type=None, source_id=None, created_at=None, updated_at=None) -> None:
|
||||
def __init__(self, name=None, id=None, type=None, value=None, unit=None, label=None,
|
||||
definition=None, block_id=None, entity_type=None, shape=None, metadata=None,
|
||||
data_type=None, source_id=None, created_at=None, updated_at=None) -> None:
|
||||
super().__init__()
|
||||
self.name = name
|
||||
self.type = type
|
||||
@ -22,7 +25,6 @@ class ItemDescriptor():
|
||||
self.best_xdim = None
|
||||
self.suggested_plotter = None
|
||||
|
||||
|
||||
def to_html(self):
|
||||
descr = "<html><h4>%s: %s</h4>" % (self.type, self.name)
|
||||
descr += "<ol style='list-style-type:none'>"
|
||||
@ -92,4 +94,3 @@ class FileDescriptor():
|
||||
descr += "</ol>"
|
||||
descr += "</html>"
|
||||
return descr
|
||||
|
||||
|
@ -28,4 +28,3 @@ class PlotterTypes(Enum):
|
||||
CategoryPlotter = "category"
|
||||
EventPlotter = "event"
|
||||
Undecided = "undecided"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user