* update dev-dependencies

* fix INP001

* rework docs (closes #720)

* update .readthedocs.yml
This commit is contained in:
sigma67 2025-01-17 20:17:04 +01:00 • committed by GitHub
commit af04fa4ac0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 83 additions and 25 deletions

View file

@ -17,4 +17,5 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
sphinx-apidoc -o source/reference/api ../ytmusicapi
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View file

@ -25,6 +25,7 @@ if errorlevel 9009 (
exit /b 1
)
sphinx-apidoc -o source/reference/api ../ytmusicapi
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

View file

@ -0,0 +1,19 @@
.wy-nav-content {
max-width: 1080px !important;
}
/* Newlines (\a) and spaces (\20) before each parameter */
.sig-param::before {
content: "\a\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20\20";
white-space: pre;
}
/* Newline after the last parameter (so the closing bracket is on a new line) */
dt em.sig-param:last-of-type::after {
content: "\a";
white-space: pre;
}
/* To have blue background of width of the block (instead of width of content) */
dl.class > dt:first-of-type {
display: block !important;
}

View file

@ -1,3 +0,0 @@
.wy-nav-content {
max-width: 1080px !important;
}

View file

@ -36,7 +36,10 @@ release = __version__
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc"]
extensions = ["sphinx.ext.autodoc", "sphinx_autodoc_typehints"]
typehints_use_signature = True
typehints_use_signature_return = True
# The suffix of source filenames.
source_suffix = ".rst"
@ -51,6 +54,9 @@ templates_path = ["_templates"]
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_css_files = [
"css/custom.css",
]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.

View file

@ -16,3 +16,4 @@ Reference for the YTMusic class.
playlists
podcasts
uploads
api/modules

View file

@ -1,22 +1,23 @@
Library
-------
.. currentmodule:: ytmusicapi
.. automethod:: YTMusic.get_library_playlists
.. automethod:: YTMusic.get_library_songs
.. automethod:: YTMusic.get_library_albums
.. automethod:: YTMusic.get_library_artists
.. automethod:: YTMusic.get_library_subscriptions
.. automethod:: YTMusic.get_library_podcasts
.. automethod:: YTMusic.get_library_channels
.. automethod:: YTMusic.get_liked_songs
.. automethod:: YTMusic.get_saved_episodes
.. automethod:: YTMusic.get_history
.. automethod:: YTMusic.add_history_item
.. automethod:: YTMusic.remove_history_items
.. automethod:: YTMusic.rate_song
.. automethod:: YTMusic.edit_song_library_status
.. automethod:: YTMusic.rate_playlist
.. automethod:: YTMusic.subscribe_artists
.. automethod:: YTMusic.unsubscribe_artists
.. automethod:: YTMusic.get_account_info
.. automodule:: ytmusicapi
.. automethod:: YTMusic.get_library_playlists
.. automethod:: YTMusic.get_library_songs
.. automethod:: YTMusic.get_library_albums
.. automethod:: YTMusic.get_library_artists
.. automethod:: YTMusic.get_library_subscriptions
.. automethod:: YTMusic.get_library_podcasts
.. automethod:: YTMusic.get_library_channels
.. automethod:: YTMusic.get_liked_songs
.. automethod:: YTMusic.get_saved_episodes
.. automethod:: YTMusic.get_history
.. automethod:: YTMusic.add_history_item
.. automethod:: YTMusic.remove_history_items
.. automethod:: YTMusic.rate_song
.. automethod:: YTMusic.edit_song_library_status
.. automethod:: YTMusic.rate_playlist
.. automethod:: YTMusic.subscribe_artists
.. automethod:: YTMusic.unsubscribe_artists
.. automethod:: YTMusic.get_account_info

View file

@ -0,0 +1,9 @@
OAuth
=====
.. automodule:: ytmusicapi.auth.oauth
:ignore-module-all:
:members:
:undoc-members:
:show-inheritance:
:imported-members:

View file

@ -1,2 +1,3 @@
sphinx<7
sphinx-rtd-theme
sphinx-rtd-theme
sphinx-autodoc-typehints>=1.23.0