Add a one-line docstring to any Python solution (5 min)

Abierto Apto para principiantes
#252 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
85/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Elige un archivo en solutions/python/ cuya función principal no tenga docstring; el issue sugiere grep -rL '"""' solutions/python/ para encontrar candidatos. Añade una línea breve de docstring inmediatamente después de la línea def de la función y deja el resto del archivo sin cambios. La tarea está terminada cuando la función seleccionada tiene un docstring claro de una línea y el cambio se envía en una pull request.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

5-minutes beginner-friendly documentation good first issue hacktoberfest help wanted no-code-needed python

Add a one-line docstring to any Python solution (5 min)

Most solution files have a function but no docstring. That makes it hard to understand what the function does at a glance. This issue is about adding exactly one line.

Time: ~5 minutes | Level: Complete beginner

What to do

Pick any file in solutions/python/ where the first function has no docstring. Add one line immediately after the def line:

def two_sum(nums, target):
    """Return indices of two numbers in nums that add up to target."""
    ...

That is the whole change. One line. You are done.

Rules
  • Pick any solutions/python/practiceN.py file where the main function has no docstring
  • Add a single """Short description.""" line as the first line inside the function
  • Do not change anything else in the file
  • Open a Pull Request

You can claim as many files as you want, one PR per file or batch them together.

How to find files that need a docstring:

grep -rL '"""' solutions/python/

That lists every Python file with no triple-quote string at all.


Open for everyone

This issue is open for everyone: beginners, experienced developers, students, and people who don't code at all. Any language, any level, no experience required. If you want to help, you are welcome here.

How to contribute

  1. Fork this repo
  2. Clone your fork and create a new branch
  3. Make your change
  4. Commit, push, and open a Pull Request

New to open source? Start here before anything else:

First Contributions - github.com/firstcontributions/first-contributions

Prefer video? Watch this: How to contribute on GitHub (YouTube)

If this repo helps you or you like where it is going, a star is a nice way to say thanks and helps other people find it. Entirely optional, and you do not need it to contribute.

Lenguaje dominante
Python
Estrellas
3
Forks
2
Merge medio
3 h 8 min
PR fusionados (30 d)
37

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Huerte/algo-solutions-python

Todos los issues de Huerte/algo-solutions-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.