This context manager has to be used in any place where unstable completer behavior and API may be called. >>> with provisionalcompleter(): ... completer.do_experimental_things() # works >>> completer.do_experimental_things() # raises. .. note:: Unstable By
(action='ignore')
| 182 | |
| 183 | @contextmanager |
| 184 | def provisionalcompleter(action='ignore'): |
| 185 | """ |
| 186 | |
| 187 | |
| 188 | This context manager has to be used in any place where unstable completer |
| 189 | behavior and API may be called. |
| 190 | |
| 191 | >>> with provisionalcompleter(): |
| 192 | ... completer.do_experimental_things() # works |
| 193 | |
| 194 | >>> completer.do_experimental_things() # raises. |
| 195 | |
| 196 | .. note:: Unstable |
| 197 | |
| 198 | By using this context manager you agree that the API in use may change |
| 199 | without warning, and that you won't complain if they do so. |
| 200 | |
| 201 | You also understand that, if the API is not to your liking, you should report |
| 202 | a bug to explain your use case upstream. |
| 203 | |
| 204 | We'll be happy to get your feedback, feature requests, and improvements on |
| 205 | any of the unstable APIs! |
| 206 | """ |
| 207 | with warnings.catch_warnings(): |
| 208 | warnings.filterwarnings(action, category=ProvisionalCompleterWarning) |
| 209 | yield |
| 210 | |
| 211 | |
| 212 | def has_open_quotes(s): |
no outgoing calls