From: Uwe Hermann Date: Wed, 19 Feb 2014 18:12:56 +0000 (+0100) Subject: jtag: Use list comprehensions. X-Git-Tag: libsigrokdecode-0.3.0~80 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=246654246821fcde172c97399e6e8175708e60b5;p=libsigrokdecode.git jtag: Use list comprehensions. --- diff --git a/decoders/jtag/pd.py b/decoders/jtag/pd.py index 26ddbac..8eb81c0 100644 --- a/decoders/jtag/pd.py +++ b/decoders/jtag/pd.py @@ -53,12 +53,6 @@ jtag_states = [ 'SHIFT-IR', 'EXIT1-IR', 'EXIT2-IR', ] -def get_annotation_classes(): - l = [] - for s in jtag_states: - l.append([s.lower(), s]) - return l - class Decoder(srd.Decoder): api_version = 1 id = 'jtag' @@ -80,7 +74,7 @@ class Decoder(srd.Decoder): {'id': 'rtck', 'name': 'RTCK', 'desc': 'Return clock signal'}, ] options = {} - annotations = get_annotation_classes() + annotations = [[s.lower(), s] for s in jtag_states] def __init__(self, **kwargs): # self.state = 'TEST-LOGIC-RESET'