Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaed3b59

Browse files
committed
Revise and restore some module docstrings
In9ccd777, several module docstrings were converted into commentsor outright deleted, apparently due to at least one of them (ingit/index/fun.py) and possibly others having broken Sphinx autodoc.As discussed later in#1733, this no longer seems to be a problem,not even in git/index/fun.py where the comment included a noteindicating it had.So this converts them back to docstrings, re-adding those that wereremoved in9ccd777. This also revises them, partly to avoid makingoutdated claims, but mostly for style and clarity. It also revisessome already-present module docstrings. Other than modules9ccd777affected, this does not add new docstrings to modules without them.One of the revisions made to some module docstrings here, toimprove readability, is to remove language like "Moduleimplementing" or "Module for", which was already used only in someplaces. However, this language is retained in the specific caseswhere it is clarifying, for example by avoiding documenting amodule as if it the same thing as a single class implemented in it(which would be distracting because it would read as a mistake, andwhich could be confusing in cases where a developer uses an importwith an "as" clause and needs to debug it because it was intendedto be an "import" or "from" statement but was accidentally writtenas the other of those).
1 parentd5d897c commitaed3b59

File tree

15 files changed

+21
-13
lines changed

15 files changed

+21
-13
lines changed

‎git/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6-
"""Module containing module parser implementation able to properly read and write
7-
configuration files."""
6+
"""Parser for reading and writing configuration files."""
87

98
importabc
109
importconfigparserascp

‎git/exc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6-
"""Module containing all exceptions thrown throughout the git package."""
6+
"""Exceptions thrown throughout the git package."""
77

88
__all__= [
99
# Defined in gitdb.exc:

‎git/index/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6+
"""Module containing IndexFile, an Index implementation facilitating all kinds of index
7+
manipulations such as querying and merging."""
8+
69
fromcontextlibimportExitStack
710
importdatetime
811
importglob

‎git/index/fun.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
# Standalone functions to accompany the index implementation and make it more versatile.
5-
# NOTE: Autodoc hates it if this is a docstring.
4+
"""Standalone functions to accompany the index implementation and make it more versatile."""
65

76
fromioimportBytesIO
87
importos

‎git/index/typ.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
"""Module with additional types used by the index."""
4+
"""Additional types used by the index."""
55

66
frombinasciiimportb2a_hex
77
frompathlibimportPath

‎git/index/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
"""Module containing index utilities."""
4+
"""Index utilities."""
55

66
fromfunctoolsimportwraps
77
importos

‎git/objects/fun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
"""Module with functions which are supposed to be as fast as possible."""
4+
"""Functions that are supposed to be as fast as possible."""
55

66
fromstatimportS_ISDIR
77

‎git/objects/tag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6-
"""Module containing allObject-based types."""
6+
"""Object-based types."""
77

88
from .importbase
99
from .utilimportget_object_type_by_name,parse_actor_and_date

‎git/objects/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6-
"""Module for general utility functions."""
6+
"""General utility functions."""
77

88
# flake8: noqa F401
99

‎git/refs/head.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4+
"""Some ref-based objects.
5+
6+
Note the distinction between the :class:`HEAD` and :class:`Head` classes.
7+
"""
8+
49
fromgit.configimportGitConfigParser,SectionConstraint
510
fromgit.utilimportjoin_path
611
fromgit.excimportGitCommandError

‎git/refs/remote.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4+
"""Module implementing a remote object allowing easy access to git remotes."""
5+
46
importos
57

68
fromgit.utilimportjoin_path

‎git/repo/fun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
"""Module with general repository-related functions."""
4+
"""General repository-related functions."""
55

66
from __future__importannotations
77

‎test/test_blob_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
"""Test the blob filter."""
4+
"""Tests for the blob filter."""
55

66
frompathlibimportPath
77
fromtypingimportSequence,Tuple

‎test/test_exc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
55

6-
76
importre
87

98
importddt

‎test/test_repo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# This module is part of GitPython and is released under the
44
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
5+
56
importglob
67
importio
78
fromioimportBytesIO

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp