Skip to content

Commit

Permalink
fix typing and sends
Browse files Browse the repository at this point in the history
  • Loading branch information
dromer committed Dec 27, 2023
1 parent 5e3ac60 commit 28e1b67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hvcc/interpreters/pd2hv/PdSendObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(

self.__send_name = ""
self.__extern_type = None
self.__attributes = {}
self.__attributes: Dict = {}

try:
# send objects don't necessarily need to have a name
Expand Down Expand Up @@ -63,19 +63,19 @@ def __init__(
self.__attributes["type"] = str(self.obj_args[5])
except ValueError:
self.add_warning(
f"Minimum, maximum, and default values for Parameter {self.__receiver_name} must be numbers.")
f"Minimum, maximum, and default values for Parameter {self.__send_name} must be numbers.")
except Exception:
pass

if not (self.__attributes["min"] <= self.__attributes["default"]):
self.add_error("Default parameter value is less than the minimum. "
"Receiver will not be exported: {0:g} < {1:g}".format(
"Send will not be exported: {0:g} < {1:g}".format(
self.__attributes["default"],
self.__attributes["min"]))
self.__extern_type = None
if not (self.__attributes["default"] <= self.__attributes["max"]):
self.add_error("Default parameter value is greater than the maximum. "
"Receiver will not be exported: {0:g} > {1:g}".format(
"Send will not be exported: {0:g} > {1:g}".format(
self.__attributes["default"],
self.__attributes["max"]))
self.__extern_type = None
Expand Down

0 comments on commit 28e1b67

Please sign in to comment.