diff options
author | Christian Clauss <cclauss@me.com> | 2021-11-11 08:53:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 08:53:53 (GMT) |
commit | 2dab655765499e9b05b8f097ab446ddee8f9adca (patch) | |
tree | 784fa84a923d433d01f438a6731479a6445a709a /misc | |
parent | e620fed887d1edc5c24377c0c0194da9f8d4b6b8 (diff) | |
download | Ninja-2dab655765499e9b05b8f097ab446ddee8f9adca.zip Ninja-2dab655765499e9b05b8f097ab446ddee8f9adca.tar.gz Ninja-2dab655765499e9b05b8f097ab446ddee8f9adca.tar.bz2 |
xrange() was removed in Python 3 in favor of range() (#2036)
https://portingguide.readthedocs.io
Diffstat (limited to 'misc')
-rw-r--r-- | misc/write_fake_manifests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/write_fake_manifests.py b/misc/write_fake_manifests.py index b3594de..abcb677 100644 --- a/misc/write_fake_manifests.py +++ b/misc/write_fake_manifests.py @@ -65,7 +65,7 @@ class GenRandom(object): def _n_unique_strings(self, n): seen = set([None]) return [self._unique_string(seen, avg_options=3, p_suffix=0.4) - for _ in xrange(n)] + for _ in range(n)] def target_name(self): return self._unique_string(p_suffix=0, seen=self.seen_names) @@ -73,7 +73,7 @@ class GenRandom(object): def path(self): return os.path.sep.join([ self._unique_string(self.seen_names, avg_options=1, p_suffix=0) - for _ in xrange(1 + paretoint(0.6, alpha=4))]) + for _ in range(1 + paretoint(0.6, alpha=4))]) def src_obj_pairs(self, path, name): num_sources = paretoint(55, alpha=2) + 1 @@ -84,7 +84,7 @@ class GenRandom(object): def defines(self): return [ '-DENABLE_' + self._unique_string(self.seen_defines).upper() - for _ in xrange(paretoint(20, alpha=3))] + for _ in range(paretoint(20, alpha=3))] LIB, EXE = 0, 1 @@ -227,7 +227,7 @@ def random_targets(num_targets, src_dir): gen = GenRandom(src_dir) # N-1 static libraries, and 1 executable depending on all of them. - targets = [Target(gen, LIB) for i in xrange(num_targets - 1)] + targets = [Target(gen, LIB) for i in range(num_targets - 1)] for i in range(len(targets)): targets[i].deps = [t for t in targets[0:i] if random.random() < 0.05] |