7638:176145438b1e | 7639:422fd05e9c91 |
---|---|
46 used, and this module (and the readline module) are silently inactive. | 46 used, and this module (and the readline module) are silently inactive. |
47 </li> | 47 </li> |
48 </ul> | 48 </ul> |
49 """ | 49 """ |
50 | 50 |
51 try: | 51 import builtins |
52 import __builtin__ as builtins | |
53 except ImportError: | |
54 import builtins | |
55 | |
56 import __main__ | 52 import __main__ |
57 | 53 |
58 __all__ = ["Completer"] | 54 __all__ = ["Completer"] |
59 | 55 |
60 | 56 |
149 elif word not in {'False', 'None', 'True', | 145 elif word not in {'False', 'None', 'True', |
150 'break', 'continue', 'pass', | 146 'break', 'continue', 'pass', |
151 'else'}: | 147 'else'}: |
152 word = word + ' ' | 148 word = word + ' ' |
153 matches.append(word) | 149 matches.append(word) |
154 for nspace in [builtins.__dict__, self.namespace]: | 150 for nspace in [self.namespace, builtins.__dict__]: |
155 for word, val in nspace.items(): | 151 for word, val in nspace.items(): |
156 if word[:n] == text and word not in seen: | 152 if word[:n] == text and word not in seen: |
157 seen.add(word) | 153 seen.add(word) |
158 matches.append(self._callable_postfix(val, word)) | 154 matches.append(self._callable_postfix(val, word)) |
159 return matches | 155 return matches |
233 for base in klass.__bases__: | 229 for base in klass.__bases__: |
234 ret = ret + get_class_members(base) | 230 ret = ret + get_class_members(base) |
235 return ret | 231 return ret |
236 | 232 |
237 # | 233 # |
238 # eflag: noqa = M702, M111 | 234 # eflag: noqa = M111 |