Commit ca26eb00 authored by Samuel GAIST's avatar Samuel GAIST

[editor] Pre-commit cleanup

parent 8c0cdc65
...@@ -37,8 +37,7 @@ from .asset import AssetType ...@@ -37,8 +37,7 @@ from .asset import AssetType
def enumerate_assets(prefix_path, asset_type, latest_only=False): def enumerate_assets(prefix_path, asset_type, latest_only=False):
"""Enumerate the assets available in the given prefix for the given type """Enumerate the assets available in the given prefix for the given type"""
"""
def _find_json_files(path): def _find_json_files(path):
"""Return all json files from folder sorted""" """Return all json files from folder sorted"""
......
...@@ -32,9 +32,9 @@ from PyQt5.QtWidgets import QComboBox ...@@ -32,9 +32,9 @@ from PyQt5.QtWidgets import QComboBox
class MouseWheelFilter(QObject): class MouseWheelFilter(QObject):
"""Event filter to avoid spin boxes and combo boxes to get triggered """Event filter to avoid spin boxes and combo boxes to get triggered
when scrolling the mouse in for example a QScrollArea when scrolling the mouse in for example a QScrollArea
Based on https://stackoverflow.com/a/5821874/5843716 Based on https://stackoverflow.com/a/5821874/5843716
""" """
def eventFilter(self, obj, event): def eventFilter(self, obj, event):
......
...@@ -89,8 +89,7 @@ class ExperimentBlock: ...@@ -89,8 +89,7 @@ class ExperimentBlock:
class AlgorithmData: class AlgorithmData:
"""Class containing the information related to the endpoints of an algorithm """Class containing the information related to the endpoints of an algorithm"""
"""
def __init__(self) -> None: def __init__(self) -> None:
self.input_type_map: typing.Mapping[str, str] = {} self.input_type_map: typing.Mapping[str, str] = {}
...@@ -257,7 +256,7 @@ class ExperimentModel: ...@@ -257,7 +256,7 @@ class ExperimentModel:
def _load_toolchain_info(self) -> None: def _load_toolchain_info(self) -> None:
"""Load the needed information from the toolchain """Load the needed information from the toolchain
Currently only the connections are of interest. Currently only the connections are of interest.
""" """
toolchain = Asset( toolchain = Asset(
......
...@@ -456,7 +456,7 @@ class AssetWidget(QWidget): ...@@ -456,7 +456,7 @@ class AssetWidget(QWidget):
@pyqtSlot(Asset) @pyqtSlot(Asset)
def loadAsset(self, asset): def loadAsset(self, asset):
""" Load the content of the file given in parameter """Load the content of the file given in parameter
:param asset Asset: asset to edit :param asset Asset: asset to edit
""" """
......
...@@ -77,7 +77,7 @@ class InputType(Enum): ...@@ -77,7 +77,7 @@ class InputType(Enum):
info = None info = None
if self is InputType.UNKNOWN: if self is InputType.UNKNOWN:
raise RuntimeError(f"Invalid type") raise RuntimeError("Invalid type")
elif np.issubdtype(self.np_type, np.floating): elif np.issubdtype(self.np_type, np.floating):
info = np.finfo(self.np_type) info = np.finfo(self.np_type)
elif np.issubdtype(self.np_type, np.integer): elif np.issubdtype(self.np_type, np.integer):
......
...@@ -39,13 +39,13 @@ from ..decorators import frozen ...@@ -39,13 +39,13 @@ from ..decorators import frozen
class NumpySpinBox(QAbstractSpinBox): class NumpySpinBox(QAbstractSpinBox):
"""Generic spinbox base class using numpy types """Generic spinbox base class using numpy types
Requires initialization with the numpy Requires initialization with the numpy
type that will be used. type that will be used.
The three following signals are provided: The three following signals are provided:
- valueChanged - valueChanged
- minimumChanged - minimumChanged
- maximumChanged - maximumChanged
""" """
numpyTypeChanged = pyqtSignal() numpyTypeChanged = pyqtSignal()
......
...@@ -241,8 +241,7 @@ class OutputPin(BasePin): ...@@ -241,8 +241,7 @@ class OutputPin(BasePin):
super().__init__(parent, pin, block, pin_brush, pin_pen) super().__init__(parent, pin, block, pin_brush, pin_pen)
def boundingRect(self): def boundingRect(self):
""" bounding rect width by height. """bounding rect width by height."""
"""
height = self.block_object.height / 2.0 height = self.block_object.height / 2.0
width = height width = height
......
...@@ -50,7 +50,7 @@ class NameLineEdit(QLineEdit): ...@@ -50,7 +50,7 @@ class NameLineEdit(QLineEdit):
class NameItemDelegate(QStyledItemDelegate): class NameItemDelegate(QStyledItemDelegate):
"""Item delegate providing a NameLineEdit so add new entries follows the rules """Item delegate providing a NameLineEdit so add new entries follows the rules
set in the schema set in the schema
""" """
def createEditor(self, parent, options, index): def createEditor(self, parent, options, index):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment