예제 #1
0
    def normalized(self):
        orig_header = self.pipeline_start
        header = []
        for i, c in enumerate(orig_header):
            if c:
                c = python_identifier(c)
                c = nml.NormHeader(c)
            if not c:
                c = f'TEMP_{i}'

            if c in header:
                c = c + f'_TEMP_{i}'

            header.append(c)

        return header
예제 #2
0
def to_string_and_then_python_identifier(thing):
    """ handl cases where a header value isn't a string """
    return python_identifier(str(thing))