Skip to content

Commit 24838a1

Browse files
style: format code with Black and isort
This commit fixes the style issues introduced in 46171dc according to the output from Black and isort. Details: None
1 parent 46171dc commit 24838a1

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

pymint/mintcompiler.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ def exitChannelStat(self, ctx: mintParser.ChannelStatContext):
251251
source_target = ctx.uftarget()[0] # type: ignore
252252
_sn = getattr(source_target, "target_name", None)
253253
source_id = (
254-
_sn.text if _sn is not None else (source_target.ID() or source_target.ID_BIG()).getText()
254+
_sn.text
255+
if _sn is not None
256+
else (source_target.ID() or source_target.ID_BIG()).getText()
255257
)
256258
if self.current_device.device.component_exists(source_id) is False:
257259
raise Exception(
@@ -270,7 +272,9 @@ def exitChannelStat(self, ctx: mintParser.ChannelStatContext):
270272
sink_target = ctx.uftarget()[1] # type: ignore
271273
_sn2 = getattr(sink_target, "target_name", None)
272274
sink_id = (
273-
_sn2.text if _sn2 is not None else (sink_target.ID() or sink_target.ID_BIG()).getText()
275+
_sn2.text
276+
if _sn2 is not None
277+
else (sink_target.ID() or sink_target.ID_BIG()).getText()
274278
)
275279
if self.current_device.device.component_exists(sink_id) is False:
276280
raise Exception(
@@ -309,7 +313,9 @@ def exitNetStat(self, ctx: mintParser.NetStatContext):
309313
source_target = ctx.uftarget()
310314
_sn = getattr(source_target, "target_name", None)
311315
source_id = (
312-
_sn.text if _sn is not None else (source_target.ID() or source_target.ID_BIG()).getText()
316+
_sn.text
317+
if _sn is not None
318+
else (source_target.ID() or source_target.ID_BIG()).getText()
313319
)
314320
if source_target.INT(): # type: ignore
315321
source_port = source_target.INT().getText() # type: ignore
@@ -323,7 +329,9 @@ def exitNetStat(self, ctx: mintParser.NetStatContext):
323329
for sink_target in ctx.uftargets().uftarget(): # type: ignore
324330
_sn2 = getattr(sink_target, "target_name", None)
325331
sink_id = (
326-
_sn2.text if _sn2 is not None else (sink_target.ID() or sink_target.ID_BIG()).getText()
332+
_sn2.text
333+
if _sn2 is not None
334+
else (sink_target.ID() or sink_target.ID_BIG()).getText()
327335
)
328336
if sink_target.INT():
329337
sink_port = sink_target.INT().getText()

0 commit comments

Comments
 (0)