Skip to content

Commit

Permalink
Merged in gvanrossum/mypy-gvanrossum (pull request #8)
Browse files Browse the repository at this point in the history
Improved docutils stubs
  • Loading branch information
JukkaL committed Jul 16, 2014
2 parents 8c3f728 + 58814ec commit 980ba47
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
9 changes: 7 additions & 2 deletions stubs/3.2/docutils/nodes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from typing import Any, Undefined
from typing import Any, List

reference = Undefined(Any)
class reference:
def __init__(self,
rawsource: str = '',
text: str = '',
*children: List[Any],
**attributes) -> None: pass
3 changes: 0 additions & 3 deletions stubs/3.2/docutils/parsers/rst.py

This file was deleted.

Empty file.
1 change: 1 addition & 0 deletions stubs/3.2/docutils/parsers/rst/nodes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pass
10 changes: 10 additions & 0 deletions stubs/3.2/docutils/parsers/rst/roles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import docutils.nodes
import docutils.parsers.rst.states

from typing import Function, Any, List, Dict, Tuple

def register_local_role(name: str,
role_fn: Function[[str, str, str, int, docutils.parsers.rst.states.Inliner, Dict, List],
Tuple[List[docutils.nodes.reference], List[docutils.nodes.reference]]]
) -> None:
pass
5 changes: 5 additions & 0 deletions stubs/3.2/docutils/parsers/rst/states.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import typing

class Inliner:
def __init__(self) -> None:
pass
1 change: 1 addition & 0 deletions stubs/3.2/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def cleandoc(doc: str) -> str: pass

def getsourcelines(obj: object) -> Tuple[List[str], int]: pass

# namedtuple('ArgSpec', 'args varargs keywords defaults')
class ArgSpec(tuple):
args = Undefined(List[str])
varargs = Undefined(str)
Expand Down

0 comments on commit 980ba47

Please sign in to comment.