From 0ebd8cb8bc41a3210a62d5016a813acad0335b58 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson <oscar.gustafsson@liu.se> Date: Mon, 10 Jun 2024 08:35:25 +0000 Subject: [PATCH] Add slots to signal generators --- b_asic/signal_generator.py | 8 ++++++++ pyproject.toml | 4 ++-- requirements.txt | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/b_asic/signal_generator.py b/b_asic/signal_generator.py index 7ce87cc1..4fbdc388 100644 --- a/b_asic/signal_generator.py +++ b/b_asic/signal_generator.py @@ -90,6 +90,8 @@ class Impulse(SignalGenerator): The delay before the signal goes to 1 for one sample. """ + __slots__ = ("_delay",) + def __init__(self, delay: int = 0) -> None: self._delay = delay @@ -110,6 +112,8 @@ class Step(SignalGenerator): The delay before the signal goes to 1. """ + __slots__ = ("_delay",) + def __init__(self, delay: int = 0) -> None: self._delay = delay @@ -130,6 +134,8 @@ class Constant(SignalGenerator): The constant. """ + __slots__ = ("_constant",) + def __init__(self, constant: complex = 1.0) -> None: self._constant = constant @@ -150,6 +156,8 @@ class ZeroPad(SignalGenerator): The data that should be padded. """ + __slots__ = ("_data", "_len") + def __init__(self, data: Sequence[complex]) -> None: self._data = data self._len = len(data) diff --git a/pyproject.toml b/pyproject.toml index f5cc2814..c0d7de2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,9 +9,9 @@ dependencies = [ "numpy", "qtpy", "graphviz>=0.19", - "matplotlib", + "matplotlib>=3.7", "setuptools_scm[toml]>=6.2", - "networkx", + "networkx>=3", "qtawesome" ] classifiers = [ diff --git a/requirements.txt b/requirements.txt index ff0a1020..5fc3bae5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy qtpy graphviz>=0.19 -matplotlib +matplotlib>=3.7 setuptools_scm[toml]>=6.2 -networkx +networkx>=3 qtawesome -- GitLab