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

Commit0327f8f

Browse files
committed
Make all one-element __slots__ be tuples
Most already were, but a few were strings.
1 parentf78587f commit0327f8f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

‎git/index/typ.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BlobFilter:
4040
The given paths are given relative to the repository.
4141
"""
4242

43-
__slots__="paths"
43+
__slots__=("paths",)
4444

4545
def__init__(self,paths:Sequence[PathLike])->None:
4646
"""

‎git/objects/tree.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class TreeModifier:
109109
the cache of a tree, will be sorted. This ensures it will be in a serializable state.
110110
"""
111111

112-
__slots__="_cache"
112+
__slots__=("_cache",)
113113

114114
def__init__(self,cache:List[TreeCacheTup])->None:
115115
self._cache=cache
@@ -214,7 +214,8 @@ class Tree(IndexObject, git_diff.Diffable, util.Traversable, util.Serializable):
214214
"""
215215

216216
type:Literal["tree"]="tree"
217-
__slots__="_cache"
217+
218+
__slots__= ("_cache",)
218219

219220
# Actual integer IDs for comparison.
220221
commit_id=0o16# Equals stat.S_IFDIR | stat.S_IFLNK - a directory link.

‎git/util.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ def update(
713713
classCallableRemoteProgress(RemoteProgress):
714714
"""An implementation forwarding updates to any callable."""
715715

716-
__slots__="_callable"
716+
__slots__=("_callable",)
717717

718718
def__init__(self,fn:Callable)->None:
719719
self._callable=fn

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp