Skip to content

Commit

Permalink
git - Merge pull request #98 from DinoTools/type_hints
Browse files Browse the repository at this point in the history
Add type hints
  • Loading branch information
phibos authored Apr 27, 2021
2 parents a4f62cf + 0ba3f85 commit 5343e74
Show file tree
Hide file tree
Showing 8 changed files with 310 additions and 261 deletions.
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Install

Supported Python versions:

* Python >= 3.6
* Python >= 3.6.2
* PyPy3

**Install:**
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sphinx
sphinx-autodoc-typehints
Empty file added docs/source/_static/.keep
Empty file.
18 changes: 13 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import sys
from pathlib import Path

from overpy import __about__ as overpy_about

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -25,6 +24,7 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx_autodoc_typehints',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
Expand All @@ -50,10 +50,15 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = overpy_about.__version__
# The full version, including alpha/beta/rc tags.
release = overpy_about.__version__
try:
from overpy import __about__ as overpy_about
# The short X.Y version.
version = overpy_about.__version__
# The full version, including alpha/beta/rc tags.
release = overpy_about.__version__
except ImportError:
version = "unknown"
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -93,6 +98,9 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False

# sphinx-autodoc-typehints options
# If True, add stub documentation for undocumented parameters to be able to add type info.
always_document_param_types = True

# -- Options for HTML output ----------------------------------------------

Expand Down
Loading

0 comments on commit 5343e74

Please sign in to comment.