|
1 | 1 | A number of old utility functions and classes have been removed:
|
2 | 2 |
|
3 |
| -- ``MapReduceMixin``: To make a checker reduce map data simply implement get_map_data and reduce_map_data. |
4 |
| -- ``is_inside_lambda``: Use ``utils.get_node_first_ancestor_of_type(x, nodes.Lambda)`` |
5 |
| -- ``check_messages``: Use ``utils.only_required_for_messages`` |
6 |
| -- ``is_class_subscriptable_pep585_with_postponed_evaluation_enabled``: Use |
7 |
| - ``is_postponed_evaluation_enabled(node)`` and ``is_node_in_type_annotation_context(node)`` |
8 |
| -- ``get_python_path``: assumption that there's always an __init__.py is not true since python 3.3 and |
9 |
| - is causing problems, particularly with PEP 420. Use ``discover_package_path`` and pass source root(s). |
10 |
| -- ``fix_import_path``: Use ``augmented_sys_path`` and pass additional ``sys.path`` entries as an |
11 |
| - argument obtained from ``discover_package_path``. |
12 |
| -- ``get_global_option``: Use ``checker.linter.config`` to get all global options. |
| 3 | +``MapReduceMixin``: To make a checker reduce map data simply implement |
| 4 | +``get_map_data`` and ``reduce_map_data``. |
| 5 | + |
| 6 | +``is_inside_lambda``: Use ``utils.get_node_first_ancestor_of_type(x, nodes.Lambda)`` |
| 7 | + |
| 8 | +``check_messages``: Use ``utils.only_required_for_messages`` |
| 9 | + |
| 10 | +``is_class_subscriptable_pep585_with_postponed_evaluation_enabled``: Use |
| 11 | +``is_postponed_evaluation_enabled(node)`` and ``is_node_in_type_annotation_context(node)`` |
| 12 | + |
| 13 | +``get_python_path``: assumption that there's always an __init__.py is not true since |
| 14 | +python 3.3 and is causing problems, particularly with PEP 420. Use ``discover_package_path`` |
| 15 | +and pass source root(s). |
| 16 | + |
| 17 | +``fix_import_path``: Use ``augmented_sys_path`` and pass additional ``sys.path`` |
| 18 | +entries as an argument obtained from ``discover_package_path``. |
| 19 | + |
| 20 | +``get_global_option``: Use ``checker.linter.config`` to get all global options. |
13 | 21 |
|
14 | 22 | Related private objects have been removed as well.
|
15 | 23 |
|
|
0 commit comments