You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert constant and attribute comments to docstrings
These are "non-reified docstrings" as described in #1734. They are
not made part of the data model, but most editors will display
them, including on symbols present in code of other projects that
use the GitPython library. A number of these have already been
added, but this adds what will probably be most of the remaining
ones.
For the most part, this doesn't create documentation where there
wasn't any, but instead converts existing comments to "docstrings."
In a handful of cases, they are expanded, reworded, or a docstring
added.
This also fixes some small style inconsistencies that were missed
in #1725, and moves a comment that had become inadvertently
displaced due to autoformatting to the item it was meant for.
The major omission here is HIDE_WINDOWS_KNOWN_ERRORS and
HIDE_WINDOWS_FREEZE_ERRORS. This doesn't convert the comments above
them to "docstrings," for a few reasons. They are not specific to
either of the symbols, they are oriented toward considerations that
are not really relevant except when developing GitPython itself,
and they are out of date. Also, because HIDE_WINDOWS_KNOWN_ERRORS
is listed in __all__, increasing the level of documentation for it
might be taken as a committment to preserve some aspect of its
current behavior, which could interfere with progress on #790. So
I've kept those comments as comments, and unchanged, for now.
"""Enables debugging of GitPython's git commands."""
280
281
281
-
# If True, a shell will be used when executing git commands.
282
-
# This should only be desirable on Windows, see https://github.com/gitpython-developers/GitPython/pull/126
283
-
# and check `git/test_repo.py:TestRepo.test_untracked_files()` TC for an example where it is required.
284
-
# Override this value using `Git.USE_SHELL = True`.
285
282
USE_SHELL=False
283
+
"""If True, a shell will be used when executing git commands.
284
+
285
+
This should only be desirable on Windows, see https://github.com/gitpython-developers/GitPython/pull/126
286
+
and check `git/test_repo.py:TestRepo.test_untracked_files()` TC for an example where it is required.
287
+
288
+
Override this value using ``Git.USE_SHELL = True``.
289
+
"""
286
290
287
-
# Provide the full path to the git executable. Otherwise it assumes git is in the path.
288
291
_git_exec_env_var="GIT_PYTHON_GIT_EXECUTABLE"
289
292
_refresh_env_var="GIT_PYTHON_REFRESH"
293
+
290
294
GIT_PYTHON_GIT_EXECUTABLE=None
291
-
# Note that the git executable is actually found during the refresh step in
292
-
# the top level __init__.
295
+
"""Provide the full path to the git executable. Otherwise it assumes git is in the path.
296
+
297
+
Note that the git executable is actually found during the refresh step in
0 commit comments