---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
W191 Indentation contains tabs
 --> W19.py:1:1
  |
1 |     '''File starts with a tab
  | ^^^^
2 |     multiline string with tab in it'''
  |

invalid-syntax: Unexpected indentation
 --> W19.py:1:1
  |
1 |     '''File starts with a tab
  | ^^^^
2 |     multiline string with tab in it'''
  |

invalid-syntax: Expected a statement
 --> W19.py:5:1
  |
4 | #: W191
5 | if False:
  | ^
6 |     print  # indented with 1 tab
7 | #:
  |

W191 Indentation contains tabs
 --> W19.py:6:1
  |
4 | #: W191
5 | if False:
6 |     print  # indented with 1 tab
  | ^^^^
7 | #:
  |

W191 Indentation contains tabs
  --> W19.py:12:1
   |
10 | #: W191
11 | y = x == 2 \
12 |     or x == 3
   | ^^^^
13 | #: E101 W191 W504
14 | if (
   |

W191 Indentation contains tabs
  --> W19.py:19:1
   |
17 |         ) or
18 |         y == 4):
19 |     pass
   | ^^^^
20 | #: E101 W191
21 | if x == 2 \
   |

W191 Indentation contains tabs
  --> W19.py:24:1
   |
22 |     or y > 1 \
23 |         or x == 3:
24 |     pass
   | ^^^^
25 | #: E101 W191
26 | if x == 2 \
   |

W191 Indentation contains tabs
  --> W19.py:29:1
   |
27 |         or y > 1 \
28 |         or x == 3:
29 |     pass
   | ^^^^
30 | #:
   |

W191 Indentation contains tabs
  --> W19.py:35:1
   |
33 | if (foo == bar and
34 |         baz == bop):
35 |     pass
   | ^^^^
36 | #: E101 W191 W504
37 | if (
   |

W191 Indentation contains tabs
  --> W19.py:41:1
   |
39 |     baz == bop
40 | ):
41 |     pass
   | ^^^^
42 | #:
   |

W191 Indentation contains tabs
  --> W19.py:47:1
   |
45 | if start[1] > end_col and not (
46 |         over_indent == 4 and indent_next):
47 |     return (0, "E121 continuation line over-"
   | ^^^^
48 |             "indented for visual indent")
49 | #:
   |

W191 Indentation contains tabs
  --> W19.py:48:1
   |
46 |         over_indent == 4 and indent_next):
47 |     return (0, "E121 continuation line over-"
48 |             "indented for visual indent")
   | ^^^^^^^^^^^^
49 | #:
   |

W191 Indentation contains tabs
  --> W19.py:57:1
   |
55 |         var_one, var_two, var_three,
56 |         var_four):
57 |     print(var_one)
   | ^^^^
58 | #: E101 W191 W504
59 | if ((row < 0 or self.moduleCount <= row or
   |

W191 Indentation contains tabs
  --> W19.py:61:1
   |
59 | if ((row < 0 or self.moduleCount <= row or
60 |      col < 0 or self.moduleCount <= col)):
61 |     raise Exception("%s,%s - %s" % (row, col, self.moduleCount))
   | ^^^^
62 | #: E101 E101 E101 E101 W191 W191 W191 W191 W191 W191
63 | if bar:
   |

W191 Indentation contains tabs
  --> W19.py:64:1
   |
62 | #: E101 E101 E101 E101 W191 W191 W191 W191 W191 W191
63 | if bar:
64 |     return (
   | ^^^^
65 |         start, 'E121 lines starting with a '
66 |         'closing bracket should be indented '
   |

W191 Indentation contains tabs
  --> W19.py:65:1
   |
63 | if bar:
64 |     return (
65 |         start, 'E121 lines starting with a '
   | ^^^^^^^^
66 |         'closing bracket should be indented '
67 |         "to match that of the opening "
   |

W191 Indentation contains tabs
  --> W19.py:66:1
   |
64 |     return (
65 |         start, 'E121 lines starting with a '
66 |         'closing bracket should be indented '
   | ^^^^^^^^
67 |         "to match that of the opening "
68 |         "bracket's line"
   |

W191 Indentation contains tabs
  --> W19.py:67:1
   |
65 |         start, 'E121 lines starting with a '
66 |         'closing bracket should be indented '
67 |         "to match that of the opening "
   | ^^^^^^^^
68 |         "bracket's line"
69 |     )
   |

W191 Indentation contains tabs
  --> W19.py:68:1
   |
66 |         'closing bracket should be indented '
67 |         "to match that of the opening "
68 |         "bracket's line"
   | ^^^^^^^^
69 |     )
70 | #
   |

W191 Indentation contains tabs
  --> W19.py:69:1
   |
67 |         "to match that of the opening "
68 |         "bracket's line"
69 |     )
   | ^^^^
70 | #
71 | #: E101 W191 W504
   |

W191 Indentation contains tabs
  --> W19.py:76:1
   |
74 |      foo.bar("bop")
75 |      )):
76 |     print("yes")
   | ^^^^
77 | #: E101 W191 W504
78 | # also ok, but starting to look like LISP
   |

W191 Indentation contains tabs
  --> W19.py:81:1
   |
79 | if ((foo.bar("baz") and
80 |      foo.bar("bop"))):
81 |     print("yes")
   | ^^^^
82 | #: E101 W191 W504
83 | if (a == 2 or
   |

W191 Indentation contains tabs
  --> W19.py:86:1
   |
84 |     b == "abc def ghi"
85 |          "jkl mno"):
86 |     return True
   | ^^^^
87 | #: E101 W191 W504
88 | if (a == 2 or
   |

W191 Indentation contains tabs
  --> W19.py:91:1
   |
89 |     b == """abc def ghi
90 | jkl mno"""):
91 |     return True
   | ^^^^
92 | #: W191:2:1 W191:3:1 E101:3:2
93 | if length > options.max_line_length:
   |

W191 Indentation contains tabs
  --> W19.py:94:1
   |
92 | #: W191:2:1 W191:3:1 E101:3:2
93 | if length > options.max_line_length:
94 |     return options.max_line_length, \
   | ^^^^
95 |         "E501 line too long (%d characters)" % length
   |

W191 Indentation contains tabs
  --> W19.py:95:1
   |
93 | if length > options.max_line_length:
94 |     return options.max_line_length, \
95 |         "E501 line too long (%d characters)" % length
   | ^^^^^^^^
   |

W191 Indentation contains tabs
   --> W19.py:101:1
    |
 99 | #: E101 W191 W191 W504
100 | if os.path.exists(os.path.join(path, PEP8_BIN)):
101 |     cmd = ([os.path.join(path, PEP8_BIN)] +
    | ^^^^
102 |            self._pep8_options(targetfile))
103 | #: W191 - okay
    |

W191 Indentation contains tabs
   --> W19.py:102:1
    |
100 | if os.path.exists(os.path.join(path, PEP8_BIN)):
101 |     cmd = ([os.path.join(path, PEP8_BIN)] +
102 |            self._pep8_options(targetfile))
    | ^^^^^^^^^^^
103 | #: W191 - okay
104 | '''
    |

W191 Indentation contains tabs
   --> W19.py:128:1
    |
126 | if foo is None and bar is "bop" and \
127 |         blah == 'yeah':
128 |     blah = 'yeahnah'
    | ^^^^
    |

W191 Indentation contains tabs
   --> W19.py:134:1
    |
132 | #: W191 W191 W191
133 | if True:
134 |     foo(
    | ^^^^
135 |         1,
136 |         2)
    |

W191 Indentation contains tabs
   --> W19.py:135:1
    |
133 | if True:
134 |     foo(
135 |         1,
    | ^^^^^^^^
136 |         2)
137 | #: W191 W191 W191 W191 W191
    |

W191 Indentation contains tabs
   --> W19.py:136:1
    |
134 |     foo(
135 |         1,
136 |         2)
    | ^^^^^^^^
137 | #: W191 W191 W191 W191 W191
138 | def test_keys(self):
    |

W191 Indentation contains tabs
   --> W19.py:139:1
    |
137 | #: W191 W191 W191 W191 W191
138 | def test_keys(self):
139 |     """areas.json - All regions are accounted for."""
    | ^^^^
140 |     expected = set([
141 |         u'Norrbotten',
    |

W191 Indentation contains tabs
   --> W19.py:140:1
    |
138 | def test_keys(self):
139 |     """areas.json - All regions are accounted for."""
140 |     expected = set([
    | ^^^^
141 |         u'Norrbotten',
142 |         u'V\xe4sterbotten',
    |

W191 Indentation contains tabs
   --> W19.py:141:1
    |
139 |     """areas.json - All regions are accounted for."""
140 |     expected = set([
141 |         u'Norrbotten',
    | ^^^^^^^^
142 |         u'V\xe4sterbotten',
143 |     ])
    |

W191 Indentation contains tabs
   --> W19.py:142:1
    |
140 |     expected = set([
141 |         u'Norrbotten',
142 |         u'V\xe4sterbotten',
    | ^^^^^^^^
143 |     ])
144 | #: W191
    |

W191 Indentation contains tabs
   --> W19.py:143:1
    |
141 |         u'Norrbotten',
142 |         u'V\xe4sterbotten',
143 |     ])
    | ^^^^
144 | #: W191
145 | x = [
    |

W191 Indentation contains tabs
   --> W19.py:146:1
    |
144 | #: W191
145 | x = [
146 |     'abc'
    | ^^^^
147 | ]
148 | #: W191 - okay
    |

W191 Indentation contains tabs
   --> W19.py:157:1
    |
156 | f"test{
157 |     tab_indented_should_be_flagged
    | ^^^^
158 | }    <- this tab is fine"
    |

W191 Indentation contains tabs
   --> W19.py:161:1
    |
160 | f"""test{
161 |     tab_indented_should_be_flagged
    | ^^^^
162 | }    <- this tab is fine"""
    |
