Skip to content

Revise docstrings, comments, and a few messages #1850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9b5531b
Fix typos and further clarify Git.refresh docstring
EliahKagan Feb 24, 2024
c0cd8a8
Clarify comment on shell case in _safer_popen_windows
EliahKagan Feb 24, 2024
afd943a
Tweak message about GIT_PYTHON_REFRESH for 80-column terminals
EliahKagan Feb 24, 2024
e08066c
Revise docstrings in git.__init__ and git.cmd
EliahKagan Feb 24, 2024
8bb882e
Fix concurrency note for stream_object_data
EliahKagan Feb 24, 2024
ba878ef
Reword partial_to_complete_sha_hex note
EliahKagan Feb 24, 2024
3958747
Update CommandError._msg documentation
EliahKagan Feb 24, 2024
f56e1ac
Tweak code formatting in Remote._set_cache_
EliahKagan Feb 24, 2024
fa471fe
Fix up Remote.push docstring
EliahKagan Feb 24, 2024
1cd73ba
Revise docstrings in second-level modules
EliahKagan Feb 25, 2024
29c63ac
Format first Git.execute overload stub like the others
EliahKagan Feb 25, 2024
cd8a312
Show full-path refresh() in failure message differently
EliahKagan Feb 25, 2024
8ec7e32
Revise docstrings within git.index
EliahKagan Feb 26, 2024
ca2ab61
Rewrite post_clear_cache note
EliahKagan Feb 26, 2024
37421e1
Further revise post_clear_cache docstring
EliahKagan Feb 26, 2024
ca32c22
Condense output_stream description in Git.execute docstring
EliahKagan Feb 26, 2024
3813bfb
Clarify Submodule.branch_path documentation
EliahKagan Feb 26, 2024
63c62ed
Revise docstrings within git.objects.submodule
EliahKagan Feb 27, 2024
115451d
Change _write to write in SubmoduleConfigParser docstring
EliahKagan Feb 27, 2024
5219489
Fix IndexObject.abspath docstring formatting
EliahKagan Feb 27, 2024
c06dfd9
Fix parameter names in TagObject.__init__
EliahKagan Feb 27, 2024
ae37a4a
Revise docstrings within git.objects
EliahKagan Feb 27, 2024
37011bf
Fix backslash formatting in git.util docstrings
EliahKagan Feb 27, 2024
d9fb2f4
Further git.util docstring revisions
EliahKagan Feb 27, 2024
d1d18c2
Revise docstrings within git.refs
EliahKagan Feb 27, 2024
4f67369
Fix backslashes in Repo.__init__ docstring
EliahKagan Feb 27, 2024
0c8ca1a
Fix Repo.iter_commits docstring about return type
EliahKagan Feb 27, 2024
b2b6f7c
Revise docstrings within git.repo
EliahKagan Feb 28, 2024
c67b2e2
Adjust spacing in colon seach mode NotImplementedError
EliahKagan Feb 28, 2024
5ee8744
Update git source link in Repo.merge_base comment
EliahKagan Feb 28, 2024
c8b6cf0
Update comment about improving expand_path overloads
EliahKagan Feb 28, 2024
bcc0c27
Fix recent inconsistency, using :raise:, not :raises:
EliahKagan Feb 28, 2024
0231b74
Further revise docstrings in git.objects.submodule.base
EliahKagan Feb 28, 2024
8344f44
Revise Repo.archive docstring
EliahKagan Feb 28, 2024
432ec72
Fix another :raises: to :raise:
EliahKagan Feb 28, 2024
5ca5844
Fully qualify non-builtin exceptions in :raise:
EliahKagan Feb 28, 2024
e6768ec
Improve Git.execute docstring formatting re: max_chunk_size
EliahKagan Feb 28, 2024
cd61eb4
Further revise docstrings in second-level modules
EliahKagan Feb 28, 2024
fc1762b
Undo a couple minor black-incompatible changes
EliahKagan Feb 28, 2024
1b25a13
Further revise docstrings within git.index
EliahKagan Feb 28, 2024
08a80aa
Further revise docstrings within git.objects.submodule
EliahKagan Feb 28, 2024
bc48d26
Further revise other docstrings within git.objects
EliahKagan Feb 28, 2024
30f7da5
Fix erroneous reference to DateTime "class"
EliahKagan Feb 28, 2024
6126997
Improve docstrings about tags
EliahKagan Feb 29, 2024
110706e
Fix param name in TagRefernece docstring and add info
EliahKagan Feb 29, 2024
b0e5bff
Undo some expansion of "reference" parameter
EliahKagan Feb 29, 2024
a5a1b2c
Add a bit of missing docstring formatting
EliahKagan Feb 29, 2024
018ebaf
Further revise docstrings within git.repo
EliahKagan Feb 29, 2024
608147e
Better explain conditional cleanup in test_base_object
EliahKagan Feb 29, 2024
5cf5b60
Revise test suite docstrings and comments
EliahKagan Feb 29, 2024
4b04d8a
Better clarify Submodule.branch_path documentation
EliahKagan Feb 29, 2024
254c82a
More docstring revisions within git.refs
EliahKagan Feb 29, 2024
679d2e8
Fix exception type in require_remote_ref_path docstring
EliahKagan Feb 29, 2024
ee0301a
More docstring revisions in second-level modules and git.__init__
EliahKagan Feb 29, 2024
231c3ef
More docstring revisions within git.repo
EliahKagan Feb 29, 2024
e166a0a
More docstring revisions within git.objects
EliahKagan Feb 29, 2024
ffeb7e7
More docstring revisions in git.objects.submodule.base
EliahKagan Feb 29, 2024
ec93955
Further refine some docstring revisions
EliahKagan Feb 29, 2024
63983c2
Remove note in GitCmdObjectDB docstring
EliahKagan Feb 29, 2024
f43292e
Somewhat improve _get_ref_info{,_helper} docstrings
EliahKagan Feb 29, 2024
37c93de
A couple more small docstring refinements
EliahKagan Feb 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix recent inconsistency, using :raise:, not :raises:
GitPython used :raise: consistently before, but I recently
introduced some occurrences of :raises: by accident. This changes
those to :raise:.
EliahKagan committed Feb 28, 2024
commit bcc0c27482a46ff030cbddf75feac070f169263e
2 changes: 1 addition & 1 deletion git/index/fun.py
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
:param args:
Arguments passed to hook file.

:raises HookExecutionError:
:raise HookExecutionError:
"""
hp = hook_path(name, index.repo.git_dir)
if not os.access(hp, os.X_OK):
2 changes: 1 addition & 1 deletion git/repo/base.py
Original file line number Diff line number Diff line change
@@ -784,7 +784,7 @@ def merge_base(self, *rev: TBD, **kwargs: Any) -> List[Union[Commit_ish, None]]:
:class:`~git.objects.commit.Commit`, or is empty if no common merge base
exists.

:raises ValueError:
:raise ValueError:
If fewer than two revisions are provided.
"""
if len(rev) < 2:
2 changes: 1 addition & 1 deletion git/repo/fun.py
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ def touch(filename: str) -> str:
def is_git_dir(d: "PathLike") -> bool:
"""This is taken from the git setup.c:is_git_directory function.

:raises WorkTreeRepositoryUnsupported:
:raise WorkTreeRepositoryUnsupported:
If it sees a worktree directory. It's quite hacky to do that here, but at least
clearly indicates that we don't support it. There is the unlikely danger to
throw if we see directories which just look like a worktree dir, but are none.