Merge lp:~gz/brz/lint_E999 into lp:brz

Proposed by Martin Packman on 2018-11-17
Status: Merged
Approved by: Jelmer Vernooij on 2018-11-17
Approved revision: 7184
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~gz/brz/lint_E999
Merge into: lp:brz
Diff against target: 99 lines (+14/-10)
5 files modified
breezy/git/tests/test_workingtree.py (+2/-3)
breezy/tests/per_workingtree/test_workingtree.py (+2/-2)
setup.cfg (+2/-1)
tools/capture_tree.py (+4/-2)
tools/prepare_for_latex.py (+4/-2)
To merge this branch: bzr merge lp:~gz/brz/lint_E999
Reviewer Review Type Date Requested Status
Jelmer Vernooij 2018-11-17 Approve on 2018-11-17
Review via email: mp+358945@code.launchpad.net

Commit message

Fix E999 lint error for Python 2 flake8.

Description of the change

Fix E999 lint error for Python 2 flake8

Ignore D and I flake8 plugin rule prefixes for now.

Fix some newly introduced rule breakage.

To post a comment you must log in.
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/git/tests/test_workingtree.py'
2--- breezy/git/tests/test_workingtree.py 2018-11-16 22:18:20 +0000
3+++ breezy/git/tests/test_workingtree.py 2018-11-17 16:31:16 +0000
4@@ -249,10 +249,9 @@
5 a = Blob.from_string(b'irrelevant\n')
6 with self.wt.lock_tree_write():
7 (index, index_path) = self.wt._lookup_index(b'a')
8- index[b'a'] = IndexEntry(
9- 0, 0, 0, 0, S_IFGITLINK, 0, 0, 0, a.id, 0)
10+ index[b'a'] = IndexEntry(0, 0, 0, 0, S_IFGITLINK, 0, 0, 0, a.id, 0)
11 self.wt._index_dirty = True
12 t = Tree()
13- t.add(b"a", S_IFGITLINK , a.id)
14+ t.add(b"a", S_IFGITLINK, a.id)
15 self.store.add_object(t)
16 self.expectDelta([], tree_id=t.id)
17
18=== modified file 'breezy/tests/per_workingtree/test_workingtree.py'
19--- breezy/tests/per_workingtree/test_workingtree.py 2018-11-16 23:21:31 +0000
20+++ breezy/tests/per_workingtree/test_workingtree.py 2018-11-17 16:31:16 +0000
21@@ -1077,8 +1077,8 @@
22 os.unlink('tree/a')
23 try:
24 self.assertEqual(
25- {'a', 'b', ''},
26- set(tree.all_versioned_paths()))
27+ {'a', 'b', ''},
28+ set(tree.all_versioned_paths()))
29 except errors.UnsupportedOperation:
30 raise TestNotApplicable('tree does not support all_file_ids')
31
32
33=== modified file 'setup.cfg'
34--- setup.cfg 2018-11-16 19:38:57 +0000
35+++ setup.cfg 2018-11-17 16:31:16 +0000
36@@ -3,6 +3,8 @@
37 # because even with the lazy import plugin it still triggers
38 # for lazy_import statements before other imports.
39 ignore =
40+ D
41+ I
42 E123
43 E241
44 E251
45@@ -29,7 +31,6 @@
46 E722
47 E731
48 E741
49- E999
50 F401
51 F402
52 F403
53
54=== modified file 'tools/capture_tree.py'
55--- tools/capture_tree.py 2017-05-22 00:56:52 +0000
56+++ tools/capture_tree.py 2018-11-17 16:31:16 +0000
57@@ -2,14 +2,16 @@
58
59 # Copyright (C) 2005 Canonical Ltd
60
61-"""Print to stdout a description of the current directory,
62+"""Print to stdout a description of the current directory,
63 formatted as a Python data structure.
64
65 This can be useful in tests that need to recreate directory
66 contents."""
67
68+from __future__ import print_function
69+
70+import os
71 import sys
72-import os
73
74 from breezy.trace import enable_default_logging
75 enable_default_logging()
76
77=== modified file 'tools/prepare_for_latex.py'
78--- tools/prepare_for_latex.py 2018-11-16 13:02:50 +0000
79+++ tools/prepare_for_latex.py 2018-11-17 16:31:16 +0000
80@@ -26,6 +26,8 @@
81 # along with this program; if not, write to the Free Software
82 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
83
84+from __future__ import print_function
85+
86 import os
87 import re
88 import shutil
89@@ -35,8 +37,8 @@
90
91 verbose = False
92
93-IMAGE_DIRECTIVE_PATTERN = re.compile(ur'^..\s+image::\s+(.*)\s+$')
94-DIRECTIVE_ELEMENT_PATTERN = re.compile(ur'^\s+:[^:]+:\s+')
95+IMAGE_DIRECTIVE_PATTERN = re.compile(u'^..\\s+image::\\s+(.*)\`\s+$')
96+DIRECTIVE_ELEMENT_PATTERN = re.compile(u'^\\s+:[^:]+:\\s+')
97
98 class Converter(object):
99 def __init__(self, srcdir, destdir):

Subscribers

People subscribed via source and target branches