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

オープン 初心者向け
#252 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
85/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
documentation

調査の方向性

主関数に docstring がない solutions/python/ 内のファイルを選びます。候補を探すため、issue では grep -rL '"""' solutions/python/ が提案されています。関数の def 行の直後に短い docstring を1行追加し、ファイルの残りは変更しないでください。選択した関数に明確な1行の docstring があり、その変更が pull request で提出されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
3
フォーク
2
平均マージ
3時間 8分
マージ済み PR(30日)
37

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Huerte/algo-solutions-python のほかの issue

Huerte/algo-solutions-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。