Skip to content

Commit

Permalink
Switched to lazily evaluated annotations
Browse files Browse the repository at this point in the history
Also upgraded annotations to use "collections.abc" in favor of "typing" where possible
  • Loading branch information
agronholm committed Sep 28, 2022
1 parent 64cba2f commit 19a962c
Show file tree
Hide file tree
Showing 56 changed files with 794 additions and 909 deletions.
15 changes: 9 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,25 @@ repos:
args: [ "--fix=lf" ]
- id: trailing-whitespace

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
args: [ "-a", "from __future__ import annotations" ]
exclude: "docs/conf.py"

- repo: https://github.com/asottile/pyupgrade
rev: v2.38.2
hooks:
- id: pyupgrade
args: [ "--py36-plus", "--keep-mock" ]
args: [ "--py37-plus", "--keep-mock" ]
exclude: "docs/conf.py"

- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort

- repo: https://github.com/csachs/pyproject-flake8
rev: v5.0.4a1.post1
hooks:
Expand Down
2 changes: 2 additions & 0 deletions src/anyio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

__all__ = (
"maybe_async",
"maybe_async_cm",
Expand Down
Loading

0 comments on commit 19a962c

Please sign in to comment.