Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ec2709

Browse files
committed
Unnecessary generator - rewrite as a dict comprehension
1 parentdb0dfa0 commit9ec2709

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎git/cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def dashify(string):
125125

126126

127127
defslots_to_dict(self,exclude=()):
128-
returndict((s,getattr(self,s))forsinself.__slots__ifsnotinexclude)
128+
return{s:getattr(self,s)forsinself.__slots__ifsnotinexclude}
129129

130130

131131
defdict_to_slots_and__excluded_are_none(self,d,excluded=()):
@@ -972,8 +972,8 @@ def _call_process(self, method, *args, **kwargs):
972972
:return: Same as ``execute``"""
973973
# Handle optional arguments prior to calling transform_kwargs
974974
# otherwise these'll end up in args, which is bad.
975-
exec_kwargs=dict((k,v)fork,vinkwargs.items()ifkinexecute_kwargs)
976-
opts_kwargs=dict((k,v)fork,vinkwargs.items()ifknotinexecute_kwargs)
975+
exec_kwargs={k:vfork,vinkwargs.items()ifkinexecute_kwargs}
976+
opts_kwargs={k:vfork,vinkwargs.items()ifknotinexecute_kwargs}
977977

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp