Esempio 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 []
Esempio 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
Esempio 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__'
Esempio 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
Esempio 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
Esempio 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(',')]
Esempio 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
Esempio 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
Esempio 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
Esempio 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__'
Esempio 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
Esempio 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
Esempio 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(',')]