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

Commitb5dd2f0

Browse files
Harmon758Byron
authored andcommitted
Remove and replace compat.xrange
1 parentae7499f commitb5dd2f0

File tree

6 files changed

+5
-11
lines changed

6 files changed

+5
-11
lines changed

‎git/compat.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515

1616
fromgitdb.utils.compatimport (
17-
xrange,
1817
MAXSIZE,# @UnusedImport
1918
izip,# @UnusedImport
2019
)

‎git/index/base.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
fromgit.compatimport (
1414
izip,
15-
xrange,
1615
string_types,
1716
force_bytes,
1817
defenc,
@@ -912,7 +911,7 @@ def move(self, items, skip_errors=False, **kwargs):
912911

913912
# parse result - first 0:n/2 lines are 'checking ', the remaining ones
914913
# are the 'renaming' ones which we parse
915-
forlninxrange(int(len(mvlines)/2),len(mvlines)):
914+
forlninrange(int(len(mvlines)/2),len(mvlines)):
916915
tokens=mvlines[ln].split(' to ')
917916
assertlen(tokens)==2,"Too many tokens in %s"%mvlines[ln]
918917

‎git/objects/fun.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
fromgit.compatimport (
44
safe_decode,
55
defenc,
6-
xrange,
76
text_type
87
)
98

@@ -20,7 +19,7 @@ def tree_to_stream(entries, write):
2019

2120
forbinsha,mode,nameinentries:
2221
mode_str=b''
23-
foriinxrange(6):
22+
foriinrange(6):
2423
mode_str=bytes([((mode>> (i*3))&bit_mask)+ord_zero])+mode_str
2524
# END for each 8 octal value
2625

‎git/refs/log.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
fromgit.compatimport (
55
PY3,
6-
xrange,
76
string_types,
87
defenc
98
)
@@ -220,7 +219,7 @@ def entry_at(cls, filepath, index):
220219
ifindex<0:
221220
returnRefLogEntry.from_line(fp.readlines()[index].strip())
222221
# read until index is reached
223-
foriinxrange(index+1):
222+
foriinrange(index+1):
224223
line=fp.readline()
225224
ifnotline:
226225
break

‎git/repo/fun.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
importstat
44
fromstringimportdigits
55

6-
fromgit.compatimportxrange
76
fromgit.excimportWorkTreeRepositoryUnsupported
87
fromgit.objectsimportObject
98
fromgit.refsimportSymbolicReference
@@ -307,7 +306,7 @@ def rev_parse(repo, rev):
307306
try:
308307
iftoken=="~":
309308
obj=to_commit(obj)
310-
for_inxrange(num):
309+
for_inrange(num):
311310
obj=obj.parents[0]
312311
# END for each history item to walk
313312
eliftoken=="^":

‎git/test/performance/test_commit.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from .libimportTestBigRepoRW
1212
fromgitimportCommit
1313
fromgitdbimportIStream
14-
fromgit.compatimportxrange
1514
fromgit.test.test_commitimportassert_commit_serialization
1615

1716

@@ -90,7 +89,7 @@ def test_commit_serialization(self):
9089

9190
nc=5000
9291
st=time()
93-
foriinxrange(nc):
92+
foriinrange(nc):
9493
cm=Commit(rwrepo,Commit.NULL_BIN_SHA,hc.tree,
9594
hc.author,hc.authored_date,hc.author_tz_offset,
9695
hc.committer,hc.committed_date,hc.committer_tz_offset,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp