def __init__(self, **options): Filter.__init__(self, **options) tags = get_list_opt(options, 'codetags', ['XXX', 'TODO', 'BUG', 'NOTE']) self.tag_re = re.compile(r'\b(%s)\b' % '|'.join([ re.escape(tag) for tag in tags if tag ]))
def __init__(self, options): Filter.__init__(self) self.options = options self.js_locals = [] self.vars = [] self.errors = [] self.br_count = 0 # count { braces
def __init__(self, **options): Filter.__init__(self, **options) self.method_name = options["method_name"] #self.descriptor = options["descriptor"] self.present = False self.get_desc = True #False
def __init__(self, **options): Filter.__init__(self, **options) self.method_name = options["method_name"] #self.descriptor = options["descriptor"] self.present = False self.get_desc = True # False
def __init__(self, **options): Filter.__init__(self, **options) self.names = set(get_list_opt(options, 'names', [])) tokentype = options.get('tokentype') if tokentype: self.tokentype = string_to_tokentype(tokentype) else: self.tokentype = Name.Function
def __init__(self, **options): Filter.__init__(self, **options) self.exception = options.get('excclass', ErrorToken) try: # issubclass() will raise TypeError if first argument is not a class if not issubclass(self.exception, Exception): raise TypeError except TypeError: raise OptionError('excclass option is not an exception class')
def __init__(self, **options): """ Filter Method Code from a whole class :param options: """ Filter.__init__(self, **options) self.method_name = options["method_name"] # self.descriptor = options["descriptor"] self.present = False self.get_desc = True # False
def __init__(self, **options): Filter.__init__(self, **options) for name, default in {'spaces': u'·', 'tabs': u'»', 'newlines': u'¶'}.items(): opt = options.get(name, False) if isinstance(opt, basestring) and len(opt) == 1: setattr(self, name, opt) else: setattr(self, name, (opt and default or '')) tabsize = get_int_opt(options, 'tabsize', 8) if self.tabs: self.tabs += ' '*(tabsize-1) if self.newlines: self.newlines += '\n' self.wstt = get_bool_opt(options, 'wstokentype', True)
def __init__(self, **options): Filter.__init__(self, **options) for name, default in [("spaces", u"·"), ("tabs", u"»"), ("newlines", u"¶")]: opt = options.get(name, False) if isinstance(opt, string_types) and len(opt) == 1: setattr(self, name, opt) else: setattr(self, name, (opt and default or "")) tabsize = get_int_opt(options, "tabsize", 8) if self.tabs: self.tabs += " " * (tabsize - 1) if self.newlines: self.newlines += "\n" self.wstt = get_bool_opt(options, "wstokentype", True)
def __init__(self, **options): Filter.__init__(self, **options) for name, default in list({'spaces': '·', 'tabs': '»', 'newlines': '¶'}.items()): opt = options.get(name, False) if isinstance(opt, str) and len(opt) == 1: setattr(self, name, opt) else: setattr(self, name, (opt and default or '')) tabsize = get_int_opt(options, 'tabsize', 8) if self.tabs: self.tabs += ' '*(tabsize-1) if self.newlines: self.newlines += '\n' self.wstt = get_bool_opt(options, 'wstokentype', True)
def __init__(self, **options): Filter.__init__(self, **options) for name, default in list({"spaces": "·", "tabs": "»", "newlines": "¶"}.items()): opt = options.get(name, False) if isinstance(opt, str) and len(opt) == 1: setattr(self, name, opt) else: setattr(self, name, (opt and default or "")) tabsize = get_int_opt(options, "tabsize", 8) if self.tabs: self.tabs += " " * (tabsize - 1) if self.newlines: self.newlines += "\n" self.wstt = get_bool_opt(options, "wstokentype", True)
def __init__(self, **options): Filter.__init__(self, **options) for name, default in [('spaces', '·'), ('tabs', '»'), ('newlines', '¶')]: opt = options.get(name, False) if isinstance(opt, str) and len(opt) == 1: setattr(self, name, opt) else: setattr(self, name, (opt and default or '')) tabsize = get_int_opt(options, 'tabsize', 8) if self.tabs: self.tabs += ' ' * (tabsize - 1) if self.newlines: self.newlines += '\n' self.wstt = get_bool_opt(options, 'wstokentype', True)
def __init__(self, **options): Filter.__init__(self, **options) for name, default in [('spaces', u'·'), ('tabs', u'»'), ('newlines', u'¶')]: opt = options.get(name, False) if isinstance(opt, string_types) and len(opt) == 1: setattr(self, name, opt) else: setattr(self, name, (opt and default or '')) tabsize = get_int_opt(options, 'tabsize', 8) if self.tabs: self.tabs += ' ' * (tabsize - 1) if self.newlines: self.newlines += '\n' self.wstt = get_bool_opt(options, 'wstokentype', True)
def __init__(self, **options): Filter.__init__(self, **options) self.annotations = options["annotations"] # Make sure the annotations are sorted by line, then char- we then only # Need to check the first annotation, not all of them. self.annotations.sort( key=lambda anno: (anno["line"], anno["range"][0]) ) self.escape_html = { ord('&'): '&', ord('<'): '<', ord('>'): '>', ord('"'): '"', ord("'"): ''', }
def __init__(self, **options): Filter.__init__(self, **options) self.n = get_int_opt(options, 'n', 0)
def __init__(self, **options): Filter.__init__(self, **options) tags = get_list_opt(options, "codetags", ["XXX", "TODO", "BUG", "NOTE"]) self.tag_re = re.compile(r"\b(%s)\b" % "|".join([re.escape(tag) for tag in tags if tag]))
def __init__(self, **options): Filter.__init__(self, **options) case = get_choice_opt(options, "case", ["lower", "upper", "capitalize"], "lower") self.convert = getattr(text_type, case)
def __init__(self, **options): Filter.__init__(self, **options) case = get_choice_opt(options, 'case', ['lower', 'upper', 'capitalize'], 'lower') self.convert = getattr(str, case)
def __init__(self, options, filename = 'stdin' ): Filter.__init__(self) self.filename = filename self.options = options self.conversions = 0 # counts converted vars
def __init__(self, **options): Filter.__init__(self, **options)
def __init__(self, srcdir, depsearchpath): self.srcdir = srcdir self.dependencypath = depsearchpath Filter.__init__(self)
def __init__(self, **options): Filter.__init__(self, **options) self.tabsize = get_int_opt(options, 'tabsize', 4) self.repl = re.compile(r'^\t+')
def __init__(self, **options): Filter.__init__(self, **options) lang = get_choice_opt(options, 'lang', ['isabelle', 'latex'], 'isabelle') self.symbols = self.lang_map[lang]
def __init__(self, **options): Filter.__init__(self, **options) self.prefix = options.get("prefix")
def __init__(self, app, **options): self.app = app Filter.__init__(self, **options)
def __init__(self, **options): Filter.__init__(self, **options) self.prev_tag1 = None self.prev_tag2 = None