summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugovk@users.noreply.github.com>2018-03-18 20:03:02 +0200
committerHugo <hugovk@users.noreply.github.com>2018-03-18 22:26:30 +0200
commit14582df679a011e8c741eb5dcd8126f883e1bc71 (patch)
tree3739015c0a76d9a3599a770888cb3bde4640f702
parent929f3e1e1b664ed8cdef90a40c96804edfd08d59 (diff)
downloadgitpython-14582df679a011e8c741eb5dcd8126f883e1bc71.tar.gz
Replace function call with set literal
-rw-r--r--git/cmd.py8
-rw-r--r--git/test/test_git.py2
-rw-r--r--git/test/test_index.py2
-rw-r--r--git/test/test_repo.py2
4 files changed, 7 insertions, 7 deletions
diff --git a/git/cmd.py b/git/cmd.py
index 6b492f11..657fa7a1 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -44,10 +44,10 @@ from .util import (
)
-execute_kwargs = set(('istream', 'with_extended_output',
- 'with_exceptions', 'as_process', 'stdout_as_string',
- 'output_stream', 'with_stdout', 'kill_after_timeout',
- 'universal_newlines', 'shell', 'env'))
+execute_kwargs = {'istream', 'with_extended_output', 'with_exceptions',
+ 'as_process', 'stdout_as_string', 'output_stream',
+ 'with_stdout', 'kill_after_timeout', 'universal_newlines',
+ 'shell', 'env'}
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())
diff --git a/git/test/test_git.py b/git/test/test_git.py
index 059f90c0..c6180f7c 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -91,7 +91,7 @@ class TestGit(TestBase):
# order is undefined
res = self.git.transform_kwargs(**{'s': True, 't': True})
- self.assertEqual(set(['-s', '-t']), set(res))
+ self.assertEqual({'-s', '-t'}, set(res))
def test_it_executes_git_to_shell_and_returns_result(self):
assert_match(r'^git version [\d\.]{2}.*$', self.git.execute(["git", "version"]))
diff --git a/git/test/test_index.py b/git/test/test_index.py
index 73123d6b..ec3c59df 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -226,7 +226,7 @@ class TestIndex(TestBase):
def test_index_merge_tree(self, rw_repo):
# A bit out of place, but we need a different repo for this:
self.assertNotEqual(self.rorepo, rw_repo)
- self.assertEqual(len(set((self.rorepo, self.rorepo, rw_repo, rw_repo))), 2)
+ self.assertEqual(len({self.rorepo, self.rorepo, rw_repo, rw_repo}), 2)
# SINGLE TREE MERGE
# current index is at the (virtual) cur_commit
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index 6985f254..97eac4ae 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -515,7 +515,7 @@ class TestRepo(TestBase):
# this is only a preliminary test, more testing done in test_index
self.assertEqual(self.rorepo, self.rorepo)
self.assertFalse(self.rorepo != self.rorepo)
- self.assertEqual(len(set((self.rorepo, self.rorepo))), 1)
+ self.assertEqual(len({self.rorepo, self.rorepo}), 1)
@with_rw_directory
def test_tilde_and_env_vars_in_repo_path(self, rw_dir):