-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for parsing stub files
Closes #100
- Loading branch information
Showing
6 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
templates_path = ["_templates"] | ||
source_suffix = ".rst" | ||
master_doc = "index" | ||
project = u"pyexample" | ||
copyright = u"2015, rtfd" | ||
author = u"rtfd" | ||
version = "0.1" | ||
release = "0.1" | ||
language = None | ||
exclude_patterns = ["_build"] | ||
pygments_style = "sphinx" | ||
todo_include_todos = False | ||
html_theme = "alabaster" | ||
html_static_path = ["_static"] | ||
htmlhelp_basename = "pyexampledoc" | ||
extensions = ["sphinx.ext.autodoc", "autoapi.extension"] | ||
autoapi_type = "python" | ||
autoapi_dirs = ["example"] | ||
autoapi_file_pattern = "*.py" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Example module | ||
This is a description | ||
""" | ||
|
||
class Foo(object): | ||
"""Can we parse arguments from the class docstring? | ||
:param attr: Set an attribute. | ||
:type attr: str | ||
""" | ||
|
||
class_var = 42 #: Class var docstring | ||
|
||
another_class_var = 42 | ||
"""Another class var docstring""" | ||
|
||
class_var_without_value = ... | ||
"""A class var without a value.""" | ||
class Meta(object): | ||
"""A nested class just to test things out""" | ||
|
||
@classmethod | ||
def foo(): | ||
"""The foo class method""" | ||
... | ||
def __init__(self, attr): | ||
"""Constructor docstring""" | ||
... | ||
def method_okay(self, foo=None, bar=None): | ||
"""This method should parse okay""" | ||
... | ||
def method_multiline(self, foo=None, bar=None, baz=None): | ||
"""This is on multiple lines, but should parse okay too | ||
pydocstyle gives us lines of source. Test if this means that multiline | ||
definitions are covered in the way we're anticipating here | ||
""" | ||
... | ||
def method_without_docstring(self): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. pyexample documentation master file, created by | ||
sphinx-quickstart on Fri May 29 13:34:37 2015. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
Welcome to pyexample's documentation! | ||
===================================== | ||
|
||
.. toctree:: | ||
|
||
autoapi/index | ||
manualapi | ||
|
||
Contents: | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters