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

Commite0c65d6

Browse files
committed
Make flake8 happy
1 parent02e942b commite0c65d6

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

‎git/cmd.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121
from .excimportGitCommandError
2222
fromgit.compatimport (
23-
text_type,
2423
string_types,
2524
defenc,
2625
PY3
@@ -400,7 +399,8 @@ def execute(self, command,
400399
ifself.GIT_PYTHON_TRACE=='full':
401400
cmdstr=" ".join(command)
402401
ifstderr_value:
403-
log.info("%s -> %d; stdout: '%s'; stderr: '%s'",cmdstr,status,stdout_value.decode(defenc),stderr_value.decode(defenc))
402+
log.info("%s -> %d; stdout: '%s'; stderr: '%s'",
403+
cmdstr,status,stdout_value.decode(defenc),stderr_value.decode(defenc))
404404
elifstdout_value:
405405
log.info("%s -> %d; stdout: '%s'",cmdstr,status,stdout_value.decode(defenc))
406406
else:
@@ -413,8 +413,7 @@ def execute(self, command,
413413
else:
414414
raiseGitCommandError(command,status,stderr_value)
415415

416-
417-
ifisinstance(stdout_value,bytes):# could also be output_stream
416+
ifisinstance(stdout_value,bytes):# could also be output_stream
418417
stdout_value=stdout_value.decode(defenc)
419418

420419
# Allow access to the command's status code

‎git/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def __init__(self, file_or_files, read_only=True):
178178
# Used in python 3, needs to stay in sync with sections for underlying implementation to work
179179
ifnothasattr(self,'_proxies'):
180180
self._proxies=self._dict()
181-
181+
182182
self._file_or_files=file_or_files
183183
self._read_only=read_only
184184
self._is_initialized=False
@@ -206,7 +206,7 @@ def __del__(self):
206206

207207
defrelease(self):
208208
"""Flush changes and release the configuration write lock. This instance must not be used anymore afterwards.
209-
In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called
209+
In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called
210210
deterministically anymore."""
211211
# checking for the lock here makes sure we do not raise during write()
212212
# in case an invalid parser was created who could not get a lock

‎git/objects/commit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,14 @@ def _serialize(self, stream):
382382
c=self.committer
383383
fmt="%s %s <%s> %s %s\n"
384384
write((fmt% ("author",aname,a.email,
385-
self.authored_date,
386-
altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding))
385+
self.authored_date,
386+
altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding))
387387

388388
# encode committer
389389
aname=c.name
390390
write((fmt% ("committer",aname,c.email,
391-
self.committed_date,
392-
altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding))
391+
self.committed_date,
392+
altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding))
393393

394394
ifself.encoding!=self.default_encoding:
395395
write(("encoding %s\n"%self.encoding).encode('ascii'))

‎git/objects/fun.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def tree_to_stream(entries, write):
4040
write(b''.join((mode_str,b' ',name,b'\0',binsha)))
4141
# END for each item
4242

43+
4344
deftree_entries_from_data(data):
4445
"""Reads the binary representation of a tree and returns tuples of Tree items
4546
:param data: data block with tree data (as bytes)

‎git/refs/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def append_entry(cls, config_reader, filepath, oldbinsha, newbinsha, message):
256256
committer=isinstance(config_reader,Actor)andconfig_readerorActor.committer(config_reader)
257257
entry=RefLogEntry((
258258
bin_to_hex(oldbinsha).decode('ascii'),
259-
bin_to_hex(newbinsha).decode('ascii'),
259+
bin_to_hex(newbinsha).decode('ascii'),
260260
committer, (int(time.time()),time.altzone),message
261261
))
262262

‎git/refs/symbolic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _get_ref_info(cls, repo, ref_path):
144144
forsha,pathincls._iter_packed_refs(repo):
145145
ifpath!=ref_path:
146146
continue
147-
# sha will be used as
147+
# sha will be used
148148
tokens=sha,path
149149
break
150150
# END for each packed ref

‎git/test/performance/test_commit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
fromgit.test.test_commitimportassert_commit_serialization
1616

1717

18-
1918
classTestPerformance(TestBigRepoRW):
2019

2120
# ref with about 100 commits in its history

‎git/test/test_commit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
Actor,
2020
)
2121
fromgitdbimportIStream
22-
fromgitdb.utilimporthex_to_bin
2322
fromgit.compatimport (
2423
string_types,
2524
text_type

‎git/test/test_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
fromcopyimportcopy
1919
fromgit.configimportcp
2020

21+
2122
classTestBase(TestCase):
2223

2324
def_to_memcache(self,file_path):

‎git/test/test_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
fromgitimportStats
1313
fromgit.compatimportdefenc
1414

15+
1516
classTestStats(TestBase):
1617

1718
deftest_list_from_string(self):

‎git/test/test_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def test_traverse(self):
138138
# END check for slash
139139

140140
# slashes in paths are supported as well
141-
# NOTE: on py3, / doesn't work with strings anymore ...
141+
# NOTE: on py3, / doesn't work with strings anymore ...
142142
assertroot[item.path]==item==root/item.path
143143
# END for each item
144144
assertfound_slash

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp