Skip to content

Commit a417158

Browse files
authored
Drop typed-ast as is no longer maintained/used (#373)
1 parent 89988e6 commit a417158

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,27 +111,3 @@ creates a circular import problem. The solution to this is the following:
111111
2. Use forward references in the type annotations (e.g. `def methodname(self, param1: 'othermodule.OtherClass'):`)
112112

113113
On Python 3.7, you can even use `from __future__ import annotations` and remove the quotes.
114-
115-
## Using type hint comments
116-
117-
If you\'re documenting code that needs to stay compatible with Python 2.7, you cannot use regular type annotations.
118-
Instead, you must either be using Python 3.8 or later or have [typed_ast](https://pypi.org/project/typed-ast/)
119-
installed. The package extras `type_comments` will pull in the appropriate dependencies automatically. Then you can add
120-
type hint comments in the following manner:
121-
122-
```python
123-
def myfunction(arg1, arg2):
124-
# type: (int, str) -> int
125-
return 42
126-
```
127-
128-
or alternatively:
129-
130-
```python
131-
def myfunction(
132-
arg1, # type: int
133-
arg2, # type: str
134-
):
135-
# type: (...) -> int
136-
return 42
137-
```

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ optional-dependencies.testing = [
5656
"sphobjinv>=2.3.1",
5757
"typing-extensions>=4.6.3",
5858
]
59-
optional-dependencies.type-comment = [
60-
'typed-ast>=1.5.4; python_version < "3.8"',
61-
]
6259
urls.Changelog = "https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md"
6360
urls.Homepage = "https://github.com/tox-dev/sphinx-autodoc-typehints"
6461
urls.Source = "https://github.com/tox-dev/sphinx-autodoc-typehints"

0 commit comments

Comments
 (0)