python3-anticaptcha/docs/conf.py

90 lines
2.8 KiB
Python
Raw Normal View History

2022-12-14 16:24:07 +00:00
# -- Path setup --------------------------------------------------------------
import os
import sys
2024-07-04 22:23:04 +00:00
from datetime import date
2022-12-14 16:24:07 +00:00
from pallets_sphinx_themes import ProjectLink
os.chdir("../")
sys.path.insert(0, os.path.abspath("src/"))
2023-03-16 23:28:19 +00:00
for x in os.walk("src/python3_anticaptcha/"):
2022-12-14 16:24:07 +00:00
sys.path.insert(0, x[0])
2023-03-20 00:58:52 +00:00
from python3_anticaptcha import core, control, turnstile
2022-12-14 16:24:07 +00:00
from python3_anticaptcha.__version__ import __version__
# -- Project information -----------------------------------------------------
project = "python3-anticaptcha"
2024-07-04 22:23:04 +00:00
copyright = f"{date.today().year}, AndreiDrang; Release - {__version__}; Last update - {date.today()}"
2022-12-14 16:24:07 +00:00
author = "AndreiDrang"
# -- General configuration ---------------------------------------------------
extensions = (
"myst_parser",
"sphinx.ext.napoleon",
"pallets_sphinx_themes",
"sphinxcontrib.autodoc_pydantic",
)
myst_enable_extensions = ["deflist"]
intersphinx_mapping = {"python": ("https://docs.python.org/3.10/", None)}
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# -- Options for HTML output -------------------------------------------------
# Theme config
html_theme = "jinja"
html_theme_options = {"index_sidebar_logo": False}
html_static_path = ["_static"]
2023-12-13 19:03:09 +00:00
html_favicon = "_static/favicon.png"
2022-12-14 16:24:07 +00:00
html_logo = "_static/AntiCaptcha.png"
html_title = f"python3-anticaptcha ({__version__})"
html_show_sourcelink = False
html_context = {
"project_links": [
ProjectLink("PyPI Releases", "https://pypi.org/project/python3-anticaptcha/"),
2023-03-20 00:58:52 +00:00
ProjectLink("Source Code", "https://github.com/AndreiDrang/python3-anticaptcha"),
2022-12-14 16:24:07 +00:00
ProjectLink(
"AntiCaptcha",
"http://getcaptchasolution.com/vchfpctqyz",
),
2023-12-13 18:55:32 +00:00
ProjectLink("RedPandaDev group", "https://red-panda-dev.xyz/blog/"),
2022-12-14 16:24:07 +00:00
]
}
html_sidebars = {
"index": ["project.html", "localtoc.html", "searchbox.html", "ethicalads.html"],
"**": ["localtoc.html", "relations.html", "searchbox.html", "ethicalads.html"],
}
# Typehints config
autodoc_typehints = "both"
autodoc_typehints_description_target = "documented"
autodoc_typehints_format = "short"
# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = False
2023-03-16 22:18:28 +00:00
napoleon_include_init_with_doc = True
2022-12-14 16:24:07 +00:00
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = False
napoleon_use_admonition_for_examples = True
napoleon_use_admonition_for_notes = True
napoleon_use_admonition_for_references = True
napoleon_use_ivar = True
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_preprocess_types = True
napoleon_type_aliases = True
napoleon_attr_annotations = True
autodoc_preserve_defaults = False
autodoc_member_order = "bysource"
autodoc_class_signature = "mixed"
# Pydantic
autodoc_pydantic_model_show_json = True
autodoc_pydantic_settings_show_json = False