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

Appearance settings

Commit 36a3b76

Browse filesBrowse files
committed
Revise some comments and strings
These are a few things I had missed in #1725.
1 parent 6cef9c0 commit 36a3b76
Copy full SHA for 36a3b76

File tree

Expand file treeCollapse file tree

3 files changed

+6
-5
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+6
-5
lines changed

‎git/config.py

Copy file name to clipboardExpand all lines: git/config.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class SectionConstraint(Generic[T_ConfigParser]):
150150
"""
151151

152152
__slots__ = ("_config", "_section_name")
153+
153154
_valid_attrs_ = (
154155
"get_value",
155156
"set_value",

‎git/objects/base.py

Copy file name to clipboardExpand all lines: git/objects/base.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __repr__(self) -> str:
137137
@property
138138
def hexsha(self) -> str:
139139
""":return: 40 byte hex version of our 20 byte binary sha"""
140-
# b2a_hex produces bytes
140+
# b2a_hex produces bytes.
141141
return bin_to_hex(self.binsha).decode("ascii")
142142

143143
@property
@@ -206,7 +206,7 @@ def __hash__(self) -> int:
206206

207207
def _set_cache_(self, attr: str) -> None:
208208
if attr in IndexObject.__slots__:
209-
# they cannot be retrieved lateron ( not without searching for them )
209+
# They cannot be retrieved later on (not without searching for them).
210210
raise AttributeError(
211211
"Attribute '%s' unset: path and mode attributes must have been set during %s object creation"
212212
% (attr, type(self).__name__)

‎git/refs/symbolic.py

Copy file name to clipboardExpand all lines: git/refs/symbolic.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _check_ref_name_valid(ref_path: PathLike) -> None:
215215
elif any(component.endswith(".lock") for component in str(ref_path).split("/")):
216216
raise ValueError(
217217
f"Invalid reference '{ref_path}': references cannot have slash-separated components that end with"
218-
f" '.lock'"
218+
" '.lock'"
219219
)
220220

221221
@classmethod
@@ -309,8 +309,8 @@ def set_commit(
309309
) -> "SymbolicReference":
310310
"""As set_object, but restricts the type of object to be a Commit.
311311
312-
:raise ValueError: If commit is not a Commit object or doesn't point to
313-
a commit
312+
:raise ValueError: If commit is not a :class:`~git.objects.commit.Commit` object
313+
or doesn't point to a commit
314314
:return: self
315315
"""
316316
# Check the type - assume the best if it is a base-string.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.