Skip to content

Commit bbf9314

Browse files
Fix pre-commit
1 parent ebe07c1 commit bbf9314

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

src/ansys/aedt/core/emit_core/nodes/emit_node.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def _parent(self):
9090

9191
@property
9292
def properties(self):
93-
"""Get's the node's properties.
93+
"""Get the node properties.
9494
9595
Returns:
9696
Dict: dictionary of the node's properties. The display name
@@ -207,10 +207,14 @@ def _set_property(self, prop, value):
207207
if len(self._emit_obj.logger.messages.error_level) > 0:
208208
error_text = self._emit_obj.logger.aedt_messages.error_level[-1]
209209
else:
210-
error_text = f'Exception in SetEmitNodeProperties: Failed setting property "{prop}" to "{value}" for {self.properties["Type"]} node "{self.name}"'
210+
error_text = (
211+
f'Exception in SetEmitNodeProperties: Failed setting property "{prop}" to "{value}" for '
212+
f'{self.properties["Type"]} node "{self.name}"'
213+
)
211214
raise Exception(error_text)
212215

213-
def _string_to_value_units(self, value):
216+
@staticmethod
217+
def _string_to_value_units(value):
214218
"""Given a value with units specified, this function
215219
will separate the units string from the decimal value.
216220

src/ansys/aedt/core/emit_core/nodes/generated/emi_plot_marker_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def text_alignment(self, value: TextAlignmentOption):
199199
def font(self):
200200
"""Specify font used for the label.
201201
202-
Value formated like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
202+
Value formatted like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
203203
"""
204204
val = self._get_property("Font")
205205
return val

src/ansys/aedt/core/emit_core/nodes/generated/result_plot_node.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def title(self, value: str):
5555
def title_font(self):
5656
"""Configure title font family, typeface, and size.
5757
58-
Value formated like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
58+
Value formatted like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
5959
"""
6060
val = self._get_property("Title Font")
6161
return val
@@ -81,7 +81,7 @@ def show_legend(self, value: bool):
8181
def legend_font(self):
8282
"""Configure legend font family, typeface, and size.
8383
84-
Value formated like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
84+
Value formatted like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
8585
"""
8686
val = self._get_property("Legend Font")
8787
return val
@@ -293,7 +293,7 @@ def max_minor_ticks_y(self, value: int):
293293
def axis_label_font(self):
294294
"""Configure axis text labels font family, typeface, and size.
295295
296-
Value formated like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
296+
Value formatted like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
297297
"""
298298
val = self._get_property("Axis Label Font")
299299
return val
@@ -306,7 +306,7 @@ def axis_label_font(self, value):
306306
def axis_tick_label_font(self):
307307
"""Configure axis tick numeric labels font family, typeface, and size.
308308
309-
Value formated like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
309+
Value formatted like 'Sans Serif,10,-1,5,50,0,0,0,0,0'.
310310
"""
311311
val = self._get_property("Axis Tick Label Font")
312312
return val

src/ansys/aedt/core/emit_core/results/results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _add_revision(self, name=None):
8080
``Revision`` object that was created.
8181
"""
8282
self.aedt_version = int(self.emit_project.aedt_version_id[-3:])
83-
if self.aedt_version > 251 and name == None:
83+
if self.aedt_version > 251 and name is None:
8484
# Return the current revision. Only create it if it isn't already there.
8585
current_revision = None
8686
current_revisions = [revision for revision in self.revisions if revision.name == "Current"]

src/ansys/aedt/core/emit_core/results/revision.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,19 @@ def __init__(self, parent_results, emit_obj, name=None):
133133
"""Full path of the revision."""
134134

135135
raw_props = emit_obj.odesign.GetResultProperties(name)
136-
key = lambda s: s.split("=", 1)[0]
137-
val = lambda s: s.split("=", 1)[1]
138-
props = {key(s): val(s) for s in raw_props}
136+
137+
props = dict(s.split("=", 1) for s in raw_props)
139138

140139
self.revision_number = int(props["Revision"])
141140
"""Unique revision number from the EMIT design"""
142141

143142
self.timestamp = props["Timestamp"]
144143
"""Unique timestamp for the revision"""
145144

146-
self.revision_loaded = False
147-
"""``True`` if the revision is loaded and ``False`` if it is not."""
148-
self._load_revision()
145+
self.revision_loaded = False
146+
"""``True`` if the revision is loaded and ``False`` if it is not."""
147+
148+
self._load_revision()
149149

150150
@pyaedt_function_handler()
151151
def _load_revision(self):

0 commit comments

Comments
 (0)