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_lut import *
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):
self.tech_name = name

View File

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

View File

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