File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ class SectionConstraint(Generic[T_ConfigParser]):
150
150
"""
151
151
152
152
__slots__ = ("_config" , "_section_name" )
153
+
153
154
_valid_attrs_ = (
154
155
"get_value" ,
155
156
"set_value" ,
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ def __repr__(self) -> str:
137
137
@property
138
138
def hexsha (self ) -> str :
139
139
""":return: 40 byte hex version of our 20 byte binary sha"""
140
- # b2a_hex produces bytes
140
+ # b2a_hex produces bytes.
141
141
return bin_to_hex (self .binsha ).decode ("ascii" )
142
142
143
143
@property
@@ -206,7 +206,7 @@ def __hash__(self) -> int:
206
206
207
207
def _set_cache_ (self , attr : str ) -> None :
208
208
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).
210
210
raise AttributeError (
211
211
"Attribute '%s' unset: path and mode attributes must have been set during %s object creation"
212
212
% (attr , type (self ).__name__ )
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def _check_ref_name_valid(ref_path: PathLike) -> None:
215
215
elif any (component .endswith (".lock" ) for component in str (ref_path ).split ("/" )):
216
216
raise ValueError (
217
217
f"Invalid reference '{ ref_path } ': references cannot have slash-separated components that end with"
218
- f " '.lock'"
218
+ " '.lock'"
219
219
)
220
220
221
221
@classmethod
@@ -309,8 +309,8 @@ def set_commit(
309
309
) -> "SymbolicReference" :
310
310
"""As set_object, but restricts the type of object to be a Commit.
311
311
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
314
314
:return: self
315
315
"""
316
316
# Check the type - assume the best if it is a base-string.
You can’t perform that action at this time.
0 commit comments