Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
ca26eb00
Commit
ca26eb00
authored
Apr 14, 2021
by
Samuel GAIST
Browse files
[editor] Pre-commit cleanup
parent
8c0cdc65
Changes
8
Hide whitespace changes
Inline
Side-by-side
beat/editor/backend/assetmodel.py
View file @
ca26eb00
...
...
@@ -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"""
...
...
beat/editor/backend/eventfilters.py
View file @
ca26eb00
...
...
@@ -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
):
...
...
beat/editor/backend/experimentmodel.py
View file @
ca26eb00
...
...
@@ -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
(
...
...
beat/editor/widgets/assetwidget.py
View file @
ca26eb00
...
...
@@ -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
"""
...
...
beat/editor/widgets/parameterwidget.py
View file @
ca26eb00
...
...
@@ -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
):
...
...
beat/editor/widgets/spinboxes.py
View file @
ca26eb00
...
...
@@ -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
()
...
...
beat/editor/widgets/toolchaineditor.py
View file @
ca26eb00
...
...
@@ -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
...
...
beat/editor/widgets/validatedhelpers.py
View file @
ca26eb00
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment