document typing.Literal in function/method arguments
Los mantenedores suelen responder en 1 día
@has2k1 ya está trabajando en esto.
Desde el 19/11/2026.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- documentation
Línea de trabajo
Start by reading the code that builds function and method signatures for generated documentation, then find its tests for type annotations. Add support for displaying the values from typing.Literal, including None when the annotation is optional. Done looks like generated signatures show the available options and the relevant tests cover this example.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Prework
- Read and abide by the Great Docs code of conduct and contributing guidelines.
- Search for duplicates among the existing issues (both open and closed).
Proposal
I have functions/methods I want to document that have Literal type annotations, for example:
def do_thing(word: str, projection: Literal["standard", "full"] | None = None) -> dict:
"""Docstring Example"""
return {}
When I generate docs, it looks like this:
do_thing(
word,
projection=None,
)
This isn't ideal - I'd like to to be able to document to a user what the available options are for projection. Could this be updated to show the available options?
Something like this, though it could be flexible:
do_thing(
word,
projection: {None, "standard", "full"} = None,
)
- Lenguaje dominante
- Python
- Estrellas
- 282
- Forks
- 24
- Merge medio
- 2 h 37 min
- PR fusionados (30 d)
- 272
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de posit-dev/great-docs
-
Potential problem with versioned documentationPosiblemente ocupada @has2k1 la tomó hace 3 días. AbiertoDifficulty: [3] Advanced Effort: [3] High Priority: ♨︎ Critical Type: ✎ Docs
Dificultad 2/5 Medio día Aptitud para principiantes 45/100
posit-dev/great-docs#774 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Type: ★ Enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
posit-dev/great-docs#353 ·
Los mantenedores suelen responder en 1 día
-
Citation anchors collide and references resolve to the wrong targetQuizá libre de nuevo @has2k1 la tomó hace 94 días y no hay ningún pull request abierto. AbiertoDifficulty: [3] Advanced Priority: [1] Low Type: ☹︎ Bug
posit-dev/great-docs#334 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
posit-dev/great-docs#330 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Customization options to replicate Quarto appearanceQuizá libre de nuevo @has2k1 la tomó hace 94 días y no hay ningún pull request abierto. AbiertoDifficulty: [3] Advanced Effort: [3] High Priority: [3] High Type: ★ Enhancement
posit-dev/great-docs#328 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de posit-dev/great-docs
Issues similares
-
Public benchmark import end-to-end test fails when the test stack's worker runs the parity jobAbiertoaccepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
future-agi/future-agi#6392 ·
Los mantenedores suelen responder en 1 día
-
memmapped_arange ignores the start value and drops the last point above the memmap thresholdPosiblemente ocupada @prathameshfuke la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
StingraySoftware/HENDRICS#213 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día