Respect tab width in line-length heuristic (#6491)

## Summary

In https://github.com/astral-sh/ruff/pull/5811, I suggested that we add
a heuristic to the overlong-lines check such that if the line had fewer
bytes than the character limit, we return early -- the idea being that a
single byte per character was the "worst case". I overlooked that this
isn't true for tabs -- with tabs, the "worst case" scenario is that
every byte is a tab, which can have a width greater than 1.

Closes https://github.com/astral-sh/ruff/issues/6425.

## Test Plan

`cargo test` with a new fixture borrowed from the issue, plus manual
testing.
This commit is contained in:
Charlie Marsh 2023-08-10 22:28:25 -04:00 committed by GitHub
parent eb68addf97
commit 95dea5c868
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 296 additions and 175 deletions

View file

@ -1,11 +1,16 @@
a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" # aaaa
a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" # aaaaa
# a
# a
# aa
# aaa
# aaaa
# a
# aa
# aaa
b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" if True: # noqa: E501
b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" [12]
[12 ]
c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" [1,2]
c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" [1, 2]
d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""

View file

@ -145,10 +145,10 @@ impl PartialOrd<LineLength> for LineWidth {
/// The size of a tab. /// The size of a tab.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, CacheKey)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, CacheKey)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
pub struct TabSize(pub NonZeroU8); pub struct TabSize(NonZeroU8);
impl TabSize { impl TabSize {
fn as_usize(self) -> usize { pub(crate) fn as_usize(self) -> usize {
self.0.get() as usize self.0.get() as usize
} }
} }

View file

@ -52,8 +52,11 @@ pub(super) fn is_overlong(
task_tags: &[String], task_tags: &[String],
tab_size: TabSize, tab_size: TabSize,
) -> Option<Overlong> { ) -> Option<Overlong> {
// Each character is between 1-4 bytes. If the number of bytes is smaller than the limit, it cannot be overlong. // The maximum width of the line is the number of bytes multiplied by the tab size (the
if line.len() < limit.get() { // worst-case scenario is that the line is all tabs). If the maximum width is less than the
// limit, then the line is not overlong.
let max_width = line.len() * tab_size.as_usize();
if max_width < limit.get() {
return None; return None;
} }

View file

@ -206,6 +206,7 @@ mod tests {
Path::new("pycodestyle/E501_2.py"), Path::new("pycodestyle/E501_2.py"),
&settings::Settings { &settings::Settings {
tab_size: NonZeroU8::new(tab_size).unwrap().into(), tab_size: NonZeroU8::new(tab_size).unwrap().into(),
line_length: LineLength::from(6),
..settings::Settings::for_rule(Rule::LineTooLong) ..settings::Settings::for_rule(Rule::LineTooLong)
}, },
)?; )?;

View file

@ -1,56 +1,51 @@
--- ---
source: crates/ruff/src/rules/pycodestyle/mod.rs source: crates/ruff/src/rules/pycodestyle/mod.rs
--- ---
E501_2.py:1:81: E501 Line too long (89 > 88 characters) E501_2.py:2:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
| ^ E501 2 | # aaaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" | ^ E501
3 | # a
4 | # a
| |
E501_2.py:2:81: E501 Line too long (89 > 88 characters) E501_2.py:3:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 2 | # aaaaa
| ^ E501 3 | # a
3 | | ^ E501
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
5 | # aa
| |
E501_2.py:4:81: E501 Line too long (89 > 88 characters) E501_2.py:7:7: E501 Line too long (7 > 6 characters)
| |
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 5 | # aa
3 | 6 | # aaa
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
| ^ E501 | ^ E501
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 8 | # a
9 | # aa
| |
E501_2.py:5:81: E501 Line too long (89 > 88 characters) E501_2.py:10:7: E501 Line too long (7 > 6 characters)
|
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
| ^ E501
6 |
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
|
E501_2.py:7:82: E501 Line too long (89 > 88 characters)
|
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
6 |
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
| ^ E501
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
|
E501_2.py:10:82: E501 Line too long (89 > 88 characters)
| |
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 8 | # a
9 | 9 | # aa
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 10 | # aaa
| ^ E501 | ^ E501
11 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 11 |
12 | if True: # noqa: E501
|
E501_2.py:16:7: E501 Line too long (7 > 6 characters)
|
14 | [12 ]
15 | [1,2]
16 | [1, 2]
| ^ E501
| |

View file

@ -1,56 +1,90 @@
--- ---
source: crates/ruff/src/rules/pycodestyle/mod.rs source: crates/ruff/src/rules/pycodestyle/mod.rs
--- ---
E501_2.py:1:81: E501 Line too long (89 > 88 characters) E501_2.py:2:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
| ^ E501 2 | # aaaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" | ^ E501
3 | # a
4 | # a
| |
E501_2.py:2:81: E501 Line too long (89 > 88 characters) E501_2.py:3:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 2 | # aaaaa
| ^ E501 3 | # a
3 | | ^ E501
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
5 | # aa
| |
E501_2.py:4:81: E501 Line too long (89 > 88 characters) E501_2.py:6:6: E501 Line too long (7 > 6 characters)
| |
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
3 | 5 | # aa
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
| ^ E501 | ^ E501
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
8 | # a
| |
E501_2.py:5:81: E501 Line too long (89 > 88 characters) E501_2.py:7:6: E501 Line too long (8 > 6 characters)
| |
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 5 | # aa
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
| ^ E501 7 | # aaaa
6 | | ^^ E501
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 8 | # a
9 | # aa
| |
E501_2.py:7:82: E501 Line too long (89 > 88 characters) E501_2.py:8:5: E501 Line too long (7 > 6 characters)
|
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
6 |
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
| ^ E501
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6"""
|
E501_2.py:10:82: E501 Line too long (89 > 88 characters)
| |
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
9 | 7 | # aaaa
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 8 | # a
| ^ E501 | ^ E501
11 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 9 | # aa
10 | # aaa
|
E501_2.py:9:5: E501 Line too long (8 > 6 characters)
|
7 | # aaaa
8 | # a
9 | # aa
| ^^ E501
10 | # aaa
|
E501_2.py:10:5: E501 Line too long (9 > 6 characters)
|
8 | # a
9 | # aa
10 | # aaa
| ^^^ E501
11 |
12 | if True: # noqa: E501
|
E501_2.py:14:6: E501 Line too long (7 > 6 characters)
|
12 | if True: # noqa: E501
13 | [12]
14 | [12 ]
| ^ E501
15 | [1,2]
16 | [1, 2]
|
E501_2.py:16:6: E501 Line too long (8 > 6 characters)
|
14 | [12 ]
15 | [1,2]
16 | [1, 2]
| ^^ E501
| |

View file

@ -1,65 +1,110 @@
--- ---
source: crates/ruff/src/rules/pycodestyle/mod.rs source: crates/ruff/src/rules/pycodestyle/mod.rs
--- ---
E501_2.py:1:81: E501 Line too long (89 > 88 characters) E501_2.py:2:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
| ^ E501 2 | # aaaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" | ^ E501
3 | # a
4 | # a
| |
E501_2.py:2:77: E501 Line too long (93 > 88 characters) E501_2.py:3:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 2 | # aaaaa
| ^^^^^ E501 3 | # a
3 | | ^ E501
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
5 | # aa
| |
E501_2.py:4:81: E501 Line too long (89 > 88 characters) E501_2.py:4:4: E501 Line too long (7 > 6 characters)
| |
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 2 | # aaaaa
3 | 3 | # a
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
| ^ E501 | ^ E501
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 5 | # aa
6 | # aaa
| |
E501_2.py:5:77: E501 Line too long (93 > 88 characters) E501_2.py:5:4: E501 Line too long (8 > 6 characters)
| |
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 3 | # a
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
| ^^^^^ E501 5 | # aa
6 | | ^^ E501
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
7 | # aaaa
| |
E501_2.py:7:82: E501 Line too long (89 > 88 characters) E501_2.py:6:4: E501 Line too long (9 > 6 characters)
| |
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
6 | 5 | # aa
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
| ^ E501 | ^^^ E501
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
8 | # a
| |
E501_2.py:8:78: E501 Line too long (89 > 88 characters) E501_2.py:7:4: E501 Line too long (10 > 6 characters)
|
5 | # aa
6 | # aaa
7 | # aaaa
| ^^^^ E501
8 | # a
9 | # aa
|
E501_2.py:8:3: E501 Line too long (11 > 6 characters)
| |
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
| ^ E501 8 | # a
9 | | ^^^ E501
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 9 | # aa
10 | # aaa
| |
E501_2.py:10:82: E501 Line too long (89 > 88 characters) E501_2.py:9:3: E501 Line too long (12 > 6 characters)
| |
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
9 | 8 | # a
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 9 | # aa
| ^ E501 | ^^^^ E501
11 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 10 | # aaa
|
E501_2.py:10:3: E501 Line too long (13 > 6 characters)
|
8 | # a
9 | # aa
10 | # aaa
| ^^^^^ E501
11 |
12 | if True: # noqa: E501
|
E501_2.py:14:4: E501 Line too long (9 > 6 characters)
|
12 | if True: # noqa: E501
13 | [12]
14 | [12 ]
| ^^^ E501
15 | [1,2]
16 | [1, 2]
|
E501_2.py:16:4: E501 Line too long (10 > 6 characters)
|
14 | [12 ]
15 | [1,2]
16 | [1, 2]
| ^^^^ E501
| |

View file

@ -1,72 +1,110 @@
--- ---
source: crates/ruff/src/rules/pycodestyle/mod.rs source: crates/ruff/src/rules/pycodestyle/mod.rs
--- ---
E501_2.py:1:81: E501 Line too long (89 > 88 characters) E501_2.py:2:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
| ^ E501 2 | # aaaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" | ^ E501
3 | # a
4 | # a
| |
E501_2.py:2:70: E501 Line too long (101 > 88 characters) E501_2.py:3:7: E501 Line too long (7 > 6 characters)
| |
1 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 1 | # aaaa
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 2 | # aaaaa
| ^^^^^^^^^^^^^ E501 3 | # a
3 | | ^ E501
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
5 | # aa
| |
E501_2.py:4:81: E501 Line too long (89 > 88 characters) E501_2.py:4:2: E501 Line too long (11 > 6 characters)
| |
2 | a = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 2 | # aaaaa
3 | 3 | # a
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
| ^ E501 | ^^^ E501
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 5 | # aa
6 | # aaa
| |
E501_2.py:5:70: E501 Line too long (101 > 88 characters) E501_2.py:5:2: E501 Line too long (12 > 6 characters)
| |
4 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 3 | # a
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
| ^^^^^^^^^^^^^ E501 5 | # aa
6 | | ^^^^ E501
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
7 | # aaaa
| |
E501_2.py:7:82: E501 Line too long (89 > 88 characters) E501_2.py:6:2: E501 Line too long (13 > 6 characters)
| |
5 | b = """ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 4 | # a
6 | 5 | # aa
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
| ^ E501 | ^^^^^ E501
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
8 | # a
| |
E501_2.py:8:71: E501 Line too long (97 > 88 characters) E501_2.py:7:2: E501 Line too long (14 > 6 characters)
|
5 | # aa
6 | # aaa
7 | # aaaa
| ^^^^^^ E501
8 | # a
9 | # aa
|
E501_2.py:8:2: E501 Line too long (19 > 6 characters)
| |
7 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 6 | # aaa
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
| ^^^^^^^^ E501 8 | # a
9 | | ^^^^^^^ E501
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 9 | # aa
10 | # aaa
| |
E501_2.py:10:82: E501 Line too long (89 > 88 characters) E501_2.py:9:2: E501 Line too long (20 > 6 characters)
| |
8 | c = """24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 7 | # aaaa
9 | 8 | # a
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 9 | # aa
| ^ E501 | ^^^^^^^^ E501
11 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 10 | # aaa
| |
E501_2.py:11:70: E501 Line too long (89 > 88 characters) E501_2.py:10:2: E501 Line too long (21 > 6 characters)
| |
10 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 8 | # a
11 | d = """💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A67ß9💣24A6""" 9 | # aa
| ^ E501 10 | # aaa
| ^^^^^^^^^ E501
11 |
12 | if True: # noqa: E501
|
E501_2.py:14:2: E501 Line too long (13 > 6 characters)
|
12 | if True: # noqa: E501
13 | [12]
14 | [12 ]
| ^^^^^ E501
15 | [1,2]
16 | [1, 2]
|
E501_2.py:16:2: E501 Line too long (14 > 6 characters)
|
14 | [12 ]
15 | [1,2]
16 | [1, 2]
| ^^^^^^ E501
| |