Skip to content

Drop support for EOL Python 2.6 and 3.3 #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 24, 2018
Prev Previous commit
Next Next commit
Replace function call with set literal
  • Loading branch information
hugovk committed Mar 18, 2018
commit 14582df679a011e8c741eb5dcd8126f883e1bc71
8 changes: 4 additions & 4 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
)


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())
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_it_transforms_kwargs_into_git_command_arguments(self):

# 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"]))
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def test_index_file_from_tree(self, rw_repo):
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
Expand Down
2 changes: 1 addition & 1 deletion git/test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def test_comparison_and_hash(self):
# 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):
Expand Down