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

Commit36a3b76

Browse files
committed
Revise some comments and strings
These are a few things I had missed in#1725.
1 parent6cef9c0 commit36a3b76

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎git/config.py

Lines 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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __repr__(self) -> str:
137137
@property
138138
defhexsha(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
returnbin_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
ifattrinIndexObject.__slots__:
209-
#they cannot be retrievedlateron (not without searching for them )
209+
#They cannot be retrievedlater on (not without searching for them).
210210
raiseAttributeError(
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

Lines 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
elifany(component.endswith(".lock")forcomponentinstr(ref_path).split("/")):
216216
raiseValueError(
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 toa commit
314314
:return: self
315315
"""
316316
# Check the type - assume the best if it is a base-string.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp