Skip to content

Commit

Permalink
document import replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jul 10, 2022
1 parent a4601cc commit 368c722
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 368c722

Please sign in to comment.