diff --git a/pyaedt/modeler/circuits/PrimitivesEmit.py b/pyaedt/modeler/circuits/PrimitivesEmit.py index e3ce1f18486..a9843eb5426 100644 --- a/pyaedt/modeler/circuits/PrimitivesEmit.py +++ b/pyaedt/modeler/circuits/PrimitivesEmit.py @@ -86,7 +86,8 @@ def design_type(self): @pyaedt_function_handler() def __getitem__(self, compname): - """ + """Get a component by its name. + Parameters ---------- compname : str diff --git a/pyaedt/sbrplus/hdm_parser.py b/pyaedt/sbrplus/hdm_parser.py index c3ea95e6179..444ea9b7054 100644 --- a/pyaedt/sbrplus/hdm_parser.py +++ b/pyaedt/sbrplus/hdm_parser.py @@ -26,7 +26,7 @@ class Parser: """ def __init__(self, filename): - """Initializes parser object with the interpreted header and a pointer to the binary data""" + """Initialize parser object with the interpreted header and a pointer to the binary data.""" self.parser_types = {} self.parser_flags = {} self.parser_enums = {} @@ -42,11 +42,11 @@ def __init__(self, filename): self.binarycontent = binarycontent def parse_message(self): - """Parses the binary content of the HDM file""" + """Parse the binary content of the HDM file.""" return self._parse(self.message["type"]) def _parse(self, type_name): - """Generic parser method, dispatches to specialized ones""" + """Use a generic parser method, which dispatches to appropriate and specialized parsers.""" if self.parser_types[type_name]["type"] == "object": return self._parse_object(type_name) elif self.parser_types[type_name]["type"] == "internal": @@ -86,9 +86,9 @@ def _parse_simple_base_type(self, format="i", size=4, how_many=1, final_type=Non def _parse_list(self, type=None, base=None, size=1): """ - Parser for vector or list. 'vector's are to be interpreted in the linear algebra sense, - and converted to numpy.array. 'list's are Python lists. Only simple base types can be - interpreted as a numpy array + Parser for vector or list. A vector is interpreted in the linear algebra sense + and converted to a NumPy array. A list is converted to a Python list. Only simple base types can be + interpreted as a NumPy array. """ assert base != None res = [] @@ -115,7 +115,7 @@ def _parse_list(self, type=None, base=None, size=1): return res def _parse_object(self, name): - """Parser for an object message""" + """Parser for an object message.""" namesdict = {} for l in self.parser_types[name]["layout"]: type_to_parse = l["type"] @@ -163,7 +163,7 @@ def _parse_object(self, name): return self.objects[name](namesdict) def _read_header(self): - """Parses the header and prepares all data structures to interpret the binary content""" + """Parse the header and prepare all data structures to interpret the binary content.""" def build_type(self, key, val): type_i = val["type"]