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
Unnecessary generator - rewrite as a dict comprehension
  • Loading branch information
hugovk committed Mar 18, 2018
commit 9ec27096fbe036a97ead869c7522262f63165e1e
6 changes: 3 additions & 3 deletions git/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def dashify(string):


def slots_to_dict(self, exclude=()):
return dict((s, getattr(self, s)) for s in self.__slots__ if s not in exclude)
return {s: getattr(self, s) for s in self.__slots__ if s not in exclude}


def dict_to_slots_and__excluded_are_none(self, d, excluded=()):
Expand Down Expand Up @@ -972,8 +972,8 @@ def _call_process(self, method, *args, **kwargs):
:return: Same as ``execute``"""
# Handle optional arguments prior to calling transform_kwargs
# otherwise these'll end up in args, which is bad.
exec_kwargs = dict((k, v) for k, v in kwargs.items() if k in execute_kwargs)
opts_kwargs = dict((k, v) for k, v in kwargs.items() if k not in execute_kwargs)
exec_kwargs = {k: v for k, v in kwargs.items() if k in execute_kwargs}
opts_kwargs = {k: v for k, v in kwargs.items() if k not in execute_kwargs}

insert_after_this_arg = opts_kwargs.pop('insert_kwargs_after', None)

Expand Down