| 110 | self.flags = PyCF_DONT_IMPLY_DEDENT | PyCF_ALLOW_INCOMPLETE_INPUT |
| 111 | |
| 112 | def __call__(self, source, filename, symbol, flags=0, **kwargs): |
| 113 | flags |= self.flags |
| 114 | if kwargs.get('incomplete_input', True) is False: |
| 115 | flags &= ~PyCF_DONT_IMPLY_DEDENT |
| 116 | flags &= ~PyCF_ALLOW_INCOMPLETE_INPUT |
| 117 | codeob = compile(source, filename, symbol, flags, True) |
| 118 | if flags & PyCF_ONLY_AST: |
| 119 | return codeob # this is an ast.Module in this case |
| 120 | for feature in _features: |
| 121 | if codeob.co_flags & feature.compiler_flag: |
| 122 | self.flags |= feature.compiler_flag |
| 123 | return codeob |
| 124 | |
| 125 | class CommandCompiler: |
| 126 | """Instances of this class have __call__ methods identical in |