Commit ca26eb00 authored by Samuel GAIST's avatar Samuel GAIST

[editor] Pre-commit cleanup

parent 8c0cdc65
......@@ -37,8 +37,7 @@ from .asset import AssetType
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):
"""Return all json files from folder sorted"""
......
......@@ -32,9 +32,9 @@ from PyQt5.QtWidgets import QComboBox
class MouseWheelFilter(QObject):
"""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):
......
......@@ -89,8 +89,7 @@ class ExperimentBlock:
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:
self.input_type_map: typing.Mapping[str, str] = {}
......@@ -257,7 +256,7 @@ class ExperimentModel:
def _load_toolchain_info(self) -> None:
"""Load the needed information from the toolchain
Currently only the connections are of interest.
Currently only the connections are of interest.
"""
toolchain = Asset(
......
......@@ -456,7 +456,7 @@ class AssetWidget(QWidget):
@pyqtSlot(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
"""
......
......@@ -77,7 +77,7 @@ class InputType(Enum):
info = None
if self is InputType.UNKNOWN:
raise RuntimeError(f"Invalid type")
raise RuntimeError("Invalid type")
elif np.issubdtype(self.np_type, np.floating):
info = np.finfo(self.np_type)
elif np.issubdtype(self.np_type, np.integer):
......
......@@ -39,13 +39,13 @@ from ..decorators import frozen
class NumpySpinBox(QAbstractSpinBox):
"""Generic spinbox base class using numpy types
Requires initialization with the numpy
type that will be used.
Requires initialization with the numpy
type that will be used.
The three following signals are provided:
- valueChanged
- minimumChanged
- maximumChanged
The three following signals are provided:
- valueChanged
- minimumChanged
- maximumChanged
"""
numpyTypeChanged = pyqtSignal()
......
......@@ -241,8 +241,7 @@ class OutputPin(BasePin):
super().__init__(parent, pin, block, pin_brush, pin_pen)
def boundingRect(self):
""" bounding rect width by height.
"""
"""bounding rect width by height."""
height = self.block_object.height / 2.0
width = height
......
......@@ -50,7 +50,7 @@ class NameLineEdit(QLineEdit):
class NameItemDelegate(QStyledItemDelegate):
"""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):
......
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