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