diff options
author | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 21:33:18 +0200 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2018-03-18 22:26:31 +0200 |
commit | ac4f7d34f8752ab78949efcaa9f0bd938df33622 (patch) | |
tree | 0c7acd1d3c1e0012d26d610c7a9fe81197e28a5e /git/refs | |
parent | 14582df679a011e8c741eb5dcd8126f883e1bc71 (diff) | |
download | gitpython-ac4f7d34f8752ab78949efcaa9f0bd938df33622.tar.gz |
Rewrite unnecessary dict/list/tuple calls as literals
Diffstat (limited to 'git/refs')
-rw-r--r-- | git/refs/head.py | 2 | ||||
-rw-r--r-- | git/refs/log.py | 2 | ||||
-rw-r--r-- | git/refs/reference.py | 2 | ||||
-rw-r--r-- | git/refs/symbolic.py | 2 | ||||
-rw-r--r-- | git/refs/tag.py | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/git/refs/head.py b/git/refs/head.py index 9ad890db..4b0abb06 100644 --- a/git/refs/head.py +++ b/git/refs/head.py @@ -20,7 +20,7 @@ class HEAD(SymbolicReference): HEAD reference.""" _HEAD_NAME = 'HEAD' _ORIG_HEAD_NAME = 'ORIG_HEAD' - __slots__ = tuple() + __slots__ = () def __init__(self, repo, path=_HEAD_NAME): if path != self._HEAD_NAME: diff --git a/git/refs/log.py b/git/refs/log.py index 1c085ef1..ac2fe6ea 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -32,7 +32,7 @@ class RefLogEntry(tuple): """Named tuple allowing easy access to the revlog data fields""" _re_hexsha_only = re.compile('^[0-9A-Fa-f]{40}$') - __slots__ = tuple() + __slots__ = () def __repr__(self): """Representation of ourselves in git reflog format""" diff --git a/git/refs/reference.py b/git/refs/reference.py index 734ed8b9..aaa9b63f 100644 --- a/git/refs/reference.py +++ b/git/refs/reference.py @@ -27,7 +27,7 @@ class Reference(SymbolicReference, LazyMixin, Iterable): """Represents a named reference to any object. Subclasses may apply restrictions though, i.e. Heads can only point to commits.""" - __slots__ = tuple() + __slots__ = () _points_to_commits_only = False _resolve_ref_on_create = True _common_path_default = "refs" diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 8efeafc5..a8ca6538 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -444,7 +444,7 @@ class SymbolicReference(object): pack_file_path = cls._get_packed_refs_path(repo) try: with open(pack_file_path, 'rb') as reader: - new_lines = list() + new_lines = [] made_change = False dropped_last_line = False for line in reader: diff --git a/git/refs/tag.py b/git/refs/tag.py index 37ee1240..8f88c522 100644 --- a/git/refs/tag.py +++ b/git/refs/tag.py @@ -17,7 +17,7 @@ class TagReference(Reference): if tagref.tag is not None: print(tagref.tag.message)""" - __slots__ = tuple() + __slots__ = () _common_path_default = "refs/tags" @property |