Skip to content

Commit

Permalink
Add def __getattr__(name) -> Any: ... to all docutils stubs (python…
Browse files Browse the repository at this point in the history
…#2439)

The stubs are very incomplete causing false positive when used. Add a
fallback to until they can become more complete.
  • Loading branch information
jdufresne authored and srittau committed Sep 13, 2018
1 parent 75e13a0 commit 47f22a3
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/3/docutils/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from typing import Any

def __getattr__(name) -> Any: ...
2 changes: 2 additions & 0 deletions third_party/3/docutils/examples.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Any

html_parts = ... # type: Any

def __getattr__(name) -> Any: ...
2 changes: 2 additions & 0 deletions third_party/3/docutils/nodes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ class reference:
text: str = ...,
*children: List[Any],
**attributes) -> None: ...

def __getattr__(name) -> Any: ...
3 changes: 3 additions & 0 deletions third_party/3/docutils/parsers/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from typing import Any

def __getattr__(name) -> Any: ...
3 changes: 3 additions & 0 deletions third_party/3/docutils/parsers/rst/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from typing import Any

def __getattr__(name) -> Any: ...
3 changes: 3 additions & 0 deletions third_party/3/docutils/parsers/rst/nodes.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from typing import Any

def __getattr__(name) -> Any: ...
2 changes: 2 additions & 0 deletions third_party/3/docutils/parsers/rst/roles.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ def register_local_role(name: str,
Tuple[List[docutils.nodes.reference], List[docutils.nodes.reference]]]
) -> None:
...

def __getattr__(name) -> Any: ...
3 changes: 3 additions & 0 deletions third_party/3/docutils/parsers/rst/states.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import typing
from typing import Any

class Inliner:
def __init__(self) -> None:
...

def __getattr__(name) -> Any: ...

0 comments on commit 47f22a3

Please sign in to comment.