summaryrefslogtreecommitdiff
path: root/gitdb/db
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-09-07 21:32:56 +0300
committerHugo <hugovk@users.noreply.github.com>2018-09-07 21:32:56 +0300
commit140104a7ecb3dfb5c43b57c4829b9d7142b4aeaf (patch)
tree635ae1d918e9a57d04cee3b4bdcaba7a32bc8bbf /gitdb/db
parent857196a7312209eed5c84fca857ab6c486bcbd6b (diff)
downloadgitdb-140104a7ecb3dfb5c43b57c4829b9d7142b4aeaf.tar.gz
Upgrade Python syntax with pyupgrade https://github.com/asottile/pyupgrade
Diffstat (limited to 'gitdb/db')
-rw-r--r--gitdb/db/pack.py2
-rw-r--r--gitdb/db/ref.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gitdb/db/pack.py b/gitdb/db/pack.py
index 6b03d83..1e37d73 100644
--- a/gitdb/db/pack.py
+++ b/gitdb/db/pack.py
@@ -148,7 +148,7 @@ class PackedDB(FileDBBase, ObjectDBR, CachingDB, LazyMixin):
# packs are supposed to be prefixed with pack- by git-convention
# get all pack files, figure out what changed
pack_files = set(glob.glob(os.path.join(self.root_path(), "pack-*.pack")))
- our_pack_files = set(item[1].pack().path() for item in self._entities)
+ our_pack_files = {item[1].pack().path() for item in self._entities}
# new packs
for pack_file in (pack_files - our_pack_files):
diff --git a/gitdb/db/ref.py b/gitdb/db/ref.py
index 94a2f01..2bb1de7 100644
--- a/gitdb/db/ref.py
+++ b/gitdb/db/ref.py
@@ -49,7 +49,7 @@ class ReferenceDB(CompoundDB):
# END handle alternates
ref_paths_set = set(ref_paths)
- cur_ref_paths_set = set(db.root_path() for db in self._dbs)
+ cur_ref_paths_set = {db.root_path() for db in self._dbs}
# remove existing
for path in (cur_ref_paths_set - ref_paths_set):