From 368c722dc67a98b9c818c11d6908f1e7078d16a7 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 9 Jul 2022 22:17:17 -0400 Subject: [PATCH] document import replacements --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 6dcdac4b..a649baa4 100644 --- a/README.md +++ b/README.md @@ -322,6 +322,31 @@ Availability: -from builtins import object # python-future ``` +### import replacements + +Availability: +- `--py3-plus` (and others) will replace imports + +see also [reorder-python-imports](https://github.com/asottile/reorder_python_imports#removing--rewriting-obsolete-six-imports) + +some examples: + +```diff +-from collections import deque, Mapping ++from collections import deque ++from collections.abc import Mapping +``` + +```diff +-from typing import Sequence ++from collections.abc import Sequence +``` + +```diff +-from typing_extensions import Concatenate ++from typing import Concatenate +``` + ### rewrite `mock` imports Availability: