Skip to content

Commit 48a8038

Browse files
committed
autopep8
1 parent db88fc9 commit 48a8038

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

pyverilog/vparser/parser.py

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -379,17 +379,23 @@ def create_ioport(self, sigtypes, name, width=None, dimensions=None, lineno=0):
379379
if 'signed' in sigtypes:
380380
signed = True
381381
if 'input' in sigtypes:
382-
first = Input(name=name, width=width, signed=signed, dimensions=dimensions, lineno=lineno)
382+
first = Input(name=name, width=width, signed=signed,
383+
dimensions=dimensions, lineno=lineno)
383384
if 'output' in sigtypes:
384-
first = Output(name=name, width=width, signed=signed, dimensions=dimensions, lineno=lineno)
385+
first = Output(name=name, width=width, signed=signed,
386+
dimensions=dimensions, lineno=lineno)
385387
if 'inout' in sigtypes:
386-
first = Inout(name=name, width=width, signed=signed, dimensions=dimensions, lineno=lineno)
388+
first = Inout(name=name, width=width, signed=signed,
389+
dimensions=dimensions, lineno=lineno)
387390
if 'wire' in sigtypes:
388-
second = Wire(name=name, width=width, signed=signed, dimensions=dimensions, lineno=lineno)
391+
second = Wire(name=name, width=width, signed=signed,
392+
dimensions=dimensions, lineno=lineno)
389393
if 'reg' in sigtypes:
390-
second = Reg(name=name, width=width, signed=signed, dimensions=dimensions, lineno=lineno)
394+
second = Reg(name=name, width=width, signed=signed,
395+
dimensions=dimensions, lineno=lineno)
391396
if 'tri' in sigtypes:
392-
second = Tri(name=name, width=width, signed=signed, dimensions=dimensions, lineno=lineno)
397+
second = Tri(name=name, width=width, signed=signed,
398+
dimensions=dimensions, lineno=lineno)
393399
return Ioport(first, second, lineno=lineno)
394400

395401
def typecheck_ioport(self, sigtypes):
@@ -455,7 +461,7 @@ def p_length(self, p):
455461
p[0] = Length(p[2], p[4], lineno=p.lineno(1))
456462
p.set_lineno(0, p.lineno(1))
457463

458-
def p_dimensions(self,p):
464+
def p_dimensions(self, p):
459465
'dimensions : dimensions length'
460466
dims = p[1].lengths + [p[2]]
461467
p[0] = Dimensions(dims, lineno=p.lineno(1))
@@ -1331,7 +1337,7 @@ def p_edgesigs(self, p):
13311337
'edgesigs : edgesigs SENS_OR edgesig'
13321338
p[0] = p[1] + (p[3],)
13331339
p.set_lineno(0, p.lineno(1))
1334-
1340+
13351341
def p_edgesigs_comma(self, p):
13361342
'edgesigs : edgesigs COMMA edgesig'
13371343
p[0] = p[1] + (p[3],)
@@ -1531,9 +1537,9 @@ def p_namedblock_statement(self, p):
15311537
"""
15321538
if isinstance(p[1], Decl):
15331539
for r in p[1].list:
1534-
if (not isinstance(r, Reg) and not isinstance(r, Wire)
1535-
and not isinstance(r, Integer) and not isinstance(r, Real)
1536-
and not isinstance(r, Parameter) and not isinstance(r, Localparam)):
1540+
if (not isinstance(r, Reg) and not isinstance(r, Wire) and
1541+
not isinstance(r, Integer) and not isinstance(r, Real) and
1542+
not isinstance(r, Parameter) and not isinstance(r, Localparam)):
15371543
raise ParseError("Syntax Error")
15381544
p[0] = p[1]
15391545
p.set_lineno(0, p.lineno(1))
@@ -1657,7 +1663,6 @@ def p_unique_case_statement(self, p):
16571663
p[0] = UniqueCaseStatement(p[3], p[5], lineno=p.lineno(1))
16581664
p.set_lineno(0, p.lineno(1))
16591665

1660-
16611666
def p_case_comp(self, p):
16621667
'case_comp : expression'
16631668
p[0] = p[1]
@@ -2076,8 +2081,8 @@ def p_funcvardecl(self, p):
20762081
"""
20772082
if isinstance(p[1], Decl):
20782083
for r in p[1].list:
2079-
if (not isinstance(r, Input) and not isinstance(r, Reg)
2080-
and not isinstance(r, Integer)):
2084+
if (not isinstance(r, Input) and not isinstance(r, Reg) and
2085+
not isinstance(r, Integer)):
20812086
raise ParseError("Syntax Error")
20822087
p[0] = p[1]
20832088
p.set_lineno(0, p.lineno(1))
@@ -2145,8 +2150,8 @@ def p_taskvardecl(self, p):
21452150
"""
21462151
if isinstance(p[1], Decl):
21472152
for r in p[1].list:
2148-
if (not isinstance(r, Input) and not isinstance(r, Reg)
2149-
and not isinstance(r, Integer)):
2153+
if (not isinstance(r, Input) and not isinstance(r, Reg) and
2154+
not isinstance(r, Integer)):
21502155
raise ParseError("Syntax Error")
21512156
p[0] = p[1]
21522157
p.set_lineno(0, p.lineno(1))

0 commit comments

Comments
 (0)