diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2023-11-17 18:21:10 +0100 |
---|---|---|
committer | Jeff Long <willcode4@gmail.com> | 2023-11-29 09:21:51 -0500 |
commit | bbae7a086bc96b90f06e9feb9615b0c849ccac10 (patch) | |
tree | e9da0ce585423787a7dd6aba943940b71b794965 | |
parent | grc/core: Type annotations, so I can somewhat sensibly work in my editor (diff) | |
download | gnuradio-bbae7a086bc96b90f06e9feb9615b0c849ccac10.tar.xz gnuradio-bbae7a086bc96b90f06e9feb9615b0c849ccac10.zip |
grc: param.py: refactor internal function name
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
(cherry picked from commit a538e9688aecd4ce52f2e6b56b329a71a33fecb0)
Signed-off-by: Jeff Long <willcode4@gmail.com>
-rw-r--r-- | grc/core/params/param.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/grc/core/params/param.py b/grc/core/params/param.py index 7422a6019..8c15f638c 100644 --- a/grc/core/params/param.py +++ b/grc/core/params/param.py @@ -171,7 +171,7 @@ class Param(Element): def get_evaluated(self) -> EvaluationType: return self._evaluated - def is_float(self, num): + def _is_float(self, num: str) -> bool: """ Check if string can be converted to float. @@ -214,7 +214,7 @@ class Param(Element): elif dtype in ('raw', 'complex', 'real', 'float', 'int', 'short', 'byte', 'hex', 'bool'): if expr: try: - if isinstance(expr, str) and self.is_float(expr[:-1]): + if isinstance(expr, str) and self._is_float(expr[:-1]): scale_factor = expr[-1:] if scale_factor in self.scale: expr = str(float(expr[:-1]) * @@ -394,7 +394,7 @@ class Param(Element): for c in range(col, col + col_span): self.hostage_cells.add((my_parent, (r, c))) - for other in self.get_all_params('gui_hint'): + for other in self._get_all_params('gui_hint'): if other is self: continue collision = next( @@ -463,7 +463,7 @@ class Param(Element): return widget_str - def get_all_params(self, dtype, key=None): + def _get_all_params(self, dtype, key=None) -> List[Element]: """ Get all the params from the flowgraph that have the given type and optionally a given key |