Ejemplo n.º 1
0
 def __init__(self, value, template, hints=None, namespaces=None,
              lineno=-1, offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     params = [v.strip() for v in value.split(';')]
     self.numeral = self._parse_expr(params.pop(0), template, lineno, offset)
     self.params = params and [name.strip() for name in
                               params[0].split(',') if name] or []
Ejemplo n.º 2
0
 def __init__(self,
              value,
              template=None,
              namespaces=None,
              lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.comment = value
Ejemplo n.º 3
0
 def __init__(self,
              value,
              template=None,
              namespaces=None,
              lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.domain = value and value.strip() or '__DEFAULT__'
Ejemplo n.º 4
0
 def __init__(self, value, template=None, namespaces=None, lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     params = [v.strip() for v in value.split(';')]
     self.numeral = self._parse_expr(params.pop(0), template, lineno, offset)
     self.params = params and [name.strip() for name in
                               params[0].split(',') if name] or []
     self.lineno = lineno
Ejemplo n.º 5
0
 def __init__(self,
              value,
              template=None,
              namespaces=None,
              lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.params = [param.strip() for param in value.split(',') if param]
     self.lineno = lineno
Ejemplo n.º 6
0
 def __init__(self,
              value,
              template,
              hints=None,
              namespaces=None,
              lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.params = [name.strip() for name in value.split(',')]
Ejemplo n.º 7
0
    def __init__(self, value, template=None, namespaces=None,
                 lineno=-1, offset=-1):
        Directive.__init__(self, None, template, namespaces, lineno, offset)

        # allow interpolation inside control attributes
        raw_value = list(interpolate(value, lineno=lineno, offset=offset))
        if all(kind is TEXT for (kind, _, _) in raw_value):
            self.raw_value = u''.join(event[1] for event in raw_value)
        else:
            self.raw_value = raw_value
Ejemplo n.º 8
0
    def __init__(self,
                 value,
                 template=None,
                 namespaces=None,
                 lineno=-1,
                 offset=-1):
        Directive.__init__(self, None, template, namespaces, lineno, offset)

        # allow interpolation inside control attributes
        raw_value = list(interpolate(value, lineno=lineno, offset=offset))
        if all(kind is TEXT for (kind, _, _) in raw_value):
            self.raw_value = u''.join(event[1] for event in raw_value)
        else:
            self.raw_value = raw_value
Ejemplo n.º 9
0
 def __init__(self, value, template=None, namespaces=None,
              lineno=-1, offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.attributes = value
Ejemplo n.º 10
0
 def __init__(self, value, template=None, namespaces=None, lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.domain = value and value.strip() or '__DEFAULT__'
Ejemplo n.º 11
0
 def __init__(self, value, template=None, namespaces=None, lineno=-1,
              offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.params = [param.strip() for param in value.split(',') if param]
     self.lineno = lineno
Ejemplo n.º 12
0
 def __init__(self, value, template, hints=None, namespaces=None,
              lineno=-1, offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.comment = value
Ejemplo n.º 13
0
 def __init__(self, value, template, hints=None, namespaces=None,
              lineno=-1, offset=-1):
     Directive.__init__(self, None, template, namespaces, lineno, offset)
     self.params = [name.strip() for name in value.split(',')]