Skip to content
Snippets Groups Projects
Commit 0ebd8cb8 authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Add slots to signal generators

parent b874af0a
No related branches found
No related tags found
1 merge request!444Add slots to signal generators
Pipeline #131480 passed
...@@ -90,6 +90,8 @@ class Impulse(SignalGenerator): ...@@ -90,6 +90,8 @@ class Impulse(SignalGenerator):
The delay before the signal goes to 1 for one sample. The delay before the signal goes to 1 for one sample.
""" """
__slots__ = ("_delay",)
def __init__(self, delay: int = 0) -> None: def __init__(self, delay: int = 0) -> None:
self._delay = delay self._delay = delay
...@@ -110,6 +112,8 @@ class Step(SignalGenerator): ...@@ -110,6 +112,8 @@ class Step(SignalGenerator):
The delay before the signal goes to 1. The delay before the signal goes to 1.
""" """
__slots__ = ("_delay",)
def __init__(self, delay: int = 0) -> None: def __init__(self, delay: int = 0) -> None:
self._delay = delay self._delay = delay
...@@ -130,6 +134,8 @@ class Constant(SignalGenerator): ...@@ -130,6 +134,8 @@ class Constant(SignalGenerator):
The constant. The constant.
""" """
__slots__ = ("_constant",)
def __init__(self, constant: complex = 1.0) -> None: def __init__(self, constant: complex = 1.0) -> None:
self._constant = constant self._constant = constant
...@@ -150,6 +156,8 @@ class ZeroPad(SignalGenerator): ...@@ -150,6 +156,8 @@ class ZeroPad(SignalGenerator):
The data that should be padded. The data that should be padded.
""" """
__slots__ = ("_data", "_len")
def __init__(self, data: Sequence[complex]) -> None: def __init__(self, data: Sequence[complex]) -> None:
self._data = data self._data = data
self._len = len(data) self._len = len(data)
......
...@@ -9,9 +9,9 @@ dependencies = [ ...@@ -9,9 +9,9 @@ dependencies = [
"numpy", "numpy",
"qtpy", "qtpy",
"graphviz>=0.19", "graphviz>=0.19",
"matplotlib", "matplotlib>=3.7",
"setuptools_scm[toml]>=6.2", "setuptools_scm[toml]>=6.2",
"networkx", "networkx>=3",
"qtawesome" "qtawesome"
] ]
classifiers = [ classifiers = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment