PEP8 cleanup

This commit is contained in:
mrg 2020-04-15 11:24:28 -07:00
parent 43fe1ae023
commit 1564d6e02b
3 changed files with 10 additions and 8 deletions

View File

@ -9,9 +9,10 @@ import debug
from drc_value import * from drc_value import *
from drc_lut import * from drc_lut import *
class design_rules(dict): class design_rules(dict):
""" """
This is a class that implements the design rules structures. This is a class that implements the design rules structures.
""" """
def __init__(self, name): def __init__(self, name):
self.tech_name = name self.tech_name = name

View File

@ -7,9 +7,10 @@
# #
import debug import debug
class drc_lut(): class drc_lut():
""" """
Implement a lookup table of rules. Implement a lookup table of rules.
Each element is a tuple with the last value being the rule. Each element is a tuple with the last value being the rule.
It searches through backwards until all of the key values are It searches through backwards until all of the key values are
met and returns the rule value. met and returns the rule value.
@ -31,7 +32,6 @@ class drc_lut():
for table_key in sorted(self.table.keys(), reverse=True): for table_key in sorted(self.table.keys(), reverse=True):
if self.match(key, table_key): if self.match(key, table_key):
return self.table[table_key] return self.table[table_key]
def match(self, key1, key2): def match(self, key1, key2):
""" """
@ -39,8 +39,8 @@ class drc_lut():
(i.e. return false if key1<key2 for any pair.) (i.e. return false if key1<key2 for any pair.)
""" """
# If any one pair is less than, return False # If any one pair is less than, return False
debug.check(len(key1)==len(key2),"Comparing invalid key lengths.") debug.check(len(key1) == len(key2), "Comparing invalid key lengths.")
for k1,k2 in zip(key1,key2): for k1, k2 in zip(key1, key2):
if k1 < k2: if k1 < k2:
return False return False
return True return True

View File

@ -6,8 +6,9 @@
# All rights reserved. # All rights reserved.
# #
class drc_value(): class drc_value():
""" """
A single DRC value. A single DRC value.
""" """
def __init__(self, value): def __init__(self, value):