python / python/typing

Warnings when building the docs

Ouverte
#1,513 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

topic: documentation
Langage dominant
Python
Étoiles
1.8k
Forks
302
Merge moyen
23 h
PR mergées (30 j)
8

Description

Building the docs locally yields a number of warnings:

% make html
mkdir -p build
PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees  . build/html 
Running Sphinx v4.2.0
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 20 source files that are out of date
updating environment: [new config] 20 added, 0 changed, 0 removed
reading sources... [100%] source/writing_stubs                                                                                              
/Users/jelle/py/typing/docs/index.rst:86: WARNING: Title underline too short.

Type-Hint and Stub Integration
----------------------
/Users/jelle/py/typing/docs/index.rst:86: WARNING: Title underline too short.

Type-Hint and Stub Integration
----------------------
looking for now-outdated files... none found
pickling environment... done
checking consistency... /Users/jelle/py/typing/docs/source/annotations.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/basics.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/dependencies.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/faq.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/inference.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/introduction.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/type_compatibility.rst: WARNING: document isn't included in any toctree
/Users/jelle/py/typing/docs/source/type_system.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [100%] source/writing_stubs                                                                                               
/Users/jelle/py/typing/docs/source/generics.rst:290: WARNING: undefined label: advanced_self
/Users/jelle/py/typing/docs/source/generics.rst:642: WARNING: undefined label: casts
/Users/jelle/py/typing/docs/source/protocols.rst:510: WARNING: undefined label: async-and-await
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 13 warnings.

The HTML pages are in build/html.

Build finished. The HTML pages are in build/html.

We should fix these.

Additionally, this should be caught in CI. Some changes to make:

  • Make builds fail on any warnings
  • Turn on Sphinx nit-picky mode to catch more issues
  • Install sphinx-lint to find additional issues

I'll send a PR to fix the warnings but I'm not currently planning to work on the CI improvements.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par exécuter make html et inspectez docs/index.rst ainsi que les fichiers indiqués sous docs/source/ pour rechercher les avertissements signalés. Confirmez que la construction de la documentation ne produit aucun avertissement, puis examinez la configuration CI du dépôt pour les échecs dus aux avertissements, le Sphinx nit-picky mode et sphinx-lint ; le travail est considéré comme terminé lorsque ces vérifications s’exécutent correctement dans CI.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
ci-cd, documentation
Type d'issue
Documentation
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.