---
source: crates/ruff_linter/src/rules/pyupgrade/mod.rs
---
UP015 [*] Unnecessary mode argument
 --> UP015.py:1:13
  |
1 | open("foo", "U")
  |             ^^^
2 | open("foo", "Ur")
3 | open("foo", "Ub")
  |
help: Remove mode argument
  |
  - open("foo", "U")
1 + open("foo")
2 | open("foo", "Ur")
  |

UP015 [*] Unnecessary mode argument
 --> UP015.py:2:13
  |
1 | open("foo", "U")
2 | open("foo", "Ur")
  |             ^^^^
3 | open("foo", "Ub")
4 | open("foo", "rUb")
  |
help: Remove mode argument
  |
1 | open("foo", "U")
  - open("foo", "Ur")
2 + open("foo")
3 | open("foo", "Ub")
  |

UP015 [*] Unnecessary modes, use `rb`
 --> UP015.py:3:13
  |
1 | open("foo", "U")
2 | open("foo", "Ur")
3 | open("foo", "Ub")
  |             ^^^^
4 | open("foo", "rUb")
5 | open("foo", "r")
  |
help: Replace with `rb`
  |
2 | open("foo", "Ur")
  - open("foo", "Ub")
3 + open("foo", "rb")
4 | open("foo", "rUb")
  |

UP015 [*] Unnecessary modes, use `rb`
 --> UP015.py:4:13
  |
2 | open("foo", "Ur")
3 | open("foo", "Ub")
4 | open("foo", "rUb")
  |             ^^^^^
5 | open("foo", "r")
6 | open("foo", "rt")
  |
help: Replace with `rb`
  |
3 | open("foo", "Ub")
  - open("foo", "rUb")
4 + open("foo", "rb")
5 | open("foo", "r")
  |

UP015 [*] Unnecessary mode argument
 --> UP015.py:5:13
  |
3 | open("foo", "Ub")
4 | open("foo", "rUb")
5 | open("foo", "r")
  |             ^^^
6 | open("foo", "rt")
7 | open("f", "r", encoding="UTF-8")
  |
help: Remove mode argument
  |
4 | open("foo", "rUb")
  - open("foo", "r")
5 + open("foo")
6 | open("foo", "rt")
  |

UP015 [*] Unnecessary mode argument
 --> UP015.py:6:13
  |
4 | open("foo", "rUb")
5 | open("foo", "r")
6 | open("foo", "rt")
  |             ^^^^
7 | open("f", "r", encoding="UTF-8")
8 | open("f", "wt")
  |
help: Remove mode argument
  |
5 | open("foo", "r")
  - open("foo", "rt")
6 + open("foo")
7 | open("f", "r", encoding="UTF-8")
  |

UP015 [*] Unnecessary mode argument
 --> UP015.py:7:11
  |
5 | open("foo", "r")
6 | open("foo", "rt")
7 | open("f", "r", encoding="UTF-8")
  |           ^^^
8 | open("f", "wt")
9 | open("f", "tw")
  |
help: Remove mode argument
  |
6 | open("foo", "rt")
  - open("f", "r", encoding="UTF-8")
7 + open("f", encoding="UTF-8")
8 | open("f", "wt")
  |

UP015 [*] Unnecessary modes, use `w`
 --> UP015.py:8:11
  |
6 | open("foo", "rt")
7 | open("f", "r", encoding="UTF-8")
8 | open("f", "wt")
  |           ^^^^
9 | open("f", "tw")
  |
help: Replace with `w`
  |
7 | open("f", "r", encoding="UTF-8")
  - open("f", "wt")
8 + open("f", "w")
9 | open("f", "tw")
  |

UP015 [*] Unnecessary modes, use `w`
  --> UP015.py:9:11
   |
 7 | open("f", "r", encoding="UTF-8")
 8 | open("f", "wt")
 9 | open("f", "tw")
   |           ^^^^
10 |
11 | with open("foo", "U") as f:
   |
help: Replace with `w`
   |
8  | open("f", "wt")
   - open("f", "tw")
9  + open("f", "w")
10 |
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:11:18
   |
 9 | open("f", "tw")
10 |
11 | with open("foo", "U") as f:
   |                  ^^^
12 |     pass
13 | with open("foo", "Ur") as f:
   |
help: Remove mode argument
   |
10 |
   - with open("foo", "U") as f:
11 + with open("foo") as f:
12 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:13:18
   |
11 | with open("foo", "U") as f:
12 |     pass
13 | with open("foo", "Ur") as f:
   |                  ^^^^
14 |     pass
15 | with open("foo", "Ub") as f:
   |
help: Remove mode argument
   |
12 |     pass
   - with open("foo", "Ur") as f:
13 + with open("foo") as f:
14 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:15:18
   |
13 | with open("foo", "Ur") as f:
14 |     pass
15 | with open("foo", "Ub") as f:
   |                  ^^^^
16 |     pass
17 | with open("foo", "rUb") as f:
   |
help: Replace with `rb`
   |
14 |     pass
   - with open("foo", "Ub") as f:
15 + with open("foo", "rb") as f:
16 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:17:18
   |
15 | with open("foo", "Ub") as f:
16 |     pass
17 | with open("foo", "rUb") as f:
   |                  ^^^^^
18 |     pass
19 | with open("foo", "r") as f:
   |
help: Replace with `rb`
   |
16 |     pass
   - with open("foo", "rUb") as f:
17 + with open("foo", "rb") as f:
18 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:19:18
   |
17 | with open("foo", "rUb") as f:
18 |     pass
19 | with open("foo", "r") as f:
   |                  ^^^
20 |     pass
21 | with open("foo", "rt") as f:
   |
help: Remove mode argument
   |
18 |     pass
   - with open("foo", "r") as f:
19 + with open("foo") as f:
20 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:21:18
   |
19 | with open("foo", "r") as f:
20 |     pass
21 | with open("foo", "rt") as f:
   |                  ^^^^
22 |     pass
23 | with open("foo", "r", encoding="UTF-8") as f:
   |
help: Remove mode argument
   |
20 |     pass
   - with open("foo", "rt") as f:
21 + with open("foo") as f:
22 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:23:18
   |
21 | with open("foo", "rt") as f:
22 |     pass
23 | with open("foo", "r", encoding="UTF-8") as f:
   |                  ^^^
24 |     pass
25 | with open("foo", "wt") as f:
   |
help: Remove mode argument
   |
22 |     pass
   - with open("foo", "r", encoding="UTF-8") as f:
23 + with open("foo", encoding="UTF-8") as f:
24 |     pass
   |

UP015 [*] Unnecessary modes, use `w`
  --> UP015.py:25:18
   |
23 | with open("foo", "r", encoding="UTF-8") as f:
24 |     pass
25 | with open("foo", "wt") as f:
   |                  ^^^^
26 |     pass
   |
help: Replace with `w`
   |
24 |     pass
   - with open("foo", "wt") as f:
25 + with open("foo", "w") as f:
26 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:28:24
   |
26 |     pass
27 |
28 | open(f("a", "b", "c"), "U")
   |                        ^^^
29 | open(f("a", "b", "c"), "Ub")
   |
help: Remove mode argument
   |
27 |
   - open(f("a", "b", "c"), "U")
28 + open(f("a", "b", "c"))
29 | open(f("a", "b", "c"), "Ub")
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:29:24
   |
28 | open(f("a", "b", "c"), "U")
29 | open(f("a", "b", "c"), "Ub")
   |                        ^^^^
30 |
31 | with open(f("a", "b", "c"), "U") as f:
   |
help: Replace with `rb`
   |
28 | open(f("a", "b", "c"), "U")
   - open(f("a", "b", "c"), "Ub")
29 + open(f("a", "b", "c"), "rb")
30 |
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:31:29
   |
29 | open(f("a", "b", "c"), "Ub")
30 |
31 | with open(f("a", "b", "c"), "U") as f:
   |                             ^^^
32 |     pass
33 | with open(f("a", "b", "c"), "Ub") as f:
   |
help: Remove mode argument
   |
30 |
   - with open(f("a", "b", "c"), "U") as f:
31 + with open(f("a", "b", "c")) as f:
32 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:33:29
   |
31 | with open(f("a", "b", "c"), "U") as f:
32 |     pass
33 | with open(f("a", "b", "c"), "Ub") as f:
   |                             ^^^^
34 |     pass
   |
help: Replace with `rb`
   |
32 |     pass
   - with open(f("a", "b", "c"), "Ub") as f:
33 + with open(f("a", "b", "c"), "rb") as f:
34 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:36:18
   |
34 |     pass
35 |
36 | with open("foo", "U") as fa, open("bar", "U") as fb:
   |                  ^^^
37 |     pass
38 | with open("foo", "Ub") as fa, open("bar", "Ub") as fb:
   |
help: Remove mode argument
   |
35 |
   - with open("foo", "U") as fa, open("bar", "U") as fb:
36 + with open("foo") as fa, open("bar", "U") as fb:
37 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:36:42
   |
34 |     pass
35 |
36 | with open("foo", "U") as fa, open("bar", "U") as fb:
   |                                          ^^^
37 |     pass
38 | with open("foo", "Ub") as fa, open("bar", "Ub") as fb:
   |
help: Remove mode argument
   |
35 |
   - with open("foo", "U") as fa, open("bar", "U") as fb:
36 + with open("foo", "U") as fa, open("bar") as fb:
37 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:38:18
   |
36 | with open("foo", "U") as fa, open("bar", "U") as fb:
37 |     pass
38 | with open("foo", "Ub") as fa, open("bar", "Ub") as fb:
   |                  ^^^^
39 |     pass
   |
help: Replace with `rb`
   |
37 |     pass
   - with open("foo", "Ub") as fa, open("bar", "Ub") as fb:
38 + with open("foo", "rb") as fa, open("bar", "Ub") as fb:
39 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:38:43
   |
36 | with open("foo", "U") as fa, open("bar", "U") as fb:
37 |     pass
38 | with open("foo", "Ub") as fa, open("bar", "Ub") as fb:
   |                                           ^^^^
39 |     pass
   |
help: Replace with `rb`
   |
37 |     pass
   - with open("foo", "Ub") as fa, open("bar", "Ub") as fb:
38 + with open("foo", "Ub") as fa, open("bar", "rb") as fb:
39 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:41:18
   |
39 |     pass
40 |
41 | open("foo", mode="U")
   |                  ^^^
42 | open(name="foo", mode="U")
43 | open(mode="U", name="foo")
   |
help: Remove mode argument
   |
40 |
   - open("foo", mode="U")
41 + open("foo")
42 | open(name="foo", mode="U")
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:42:23
   |
41 | open("foo", mode="U")
42 | open(name="foo", mode="U")
   |                       ^^^
43 | open(mode="U", name="foo")
   |
help: Remove mode argument
   |
41 | open("foo", mode="U")
   - open(name="foo", mode="U")
42 + open(name="foo")
43 | open(mode="U", name="foo")
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:43:11
   |
41 | open("foo", mode="U")
42 | open(name="foo", mode="U")
43 | open(mode="U", name="foo")
   |           ^^^
44 |
45 | with open("foo", mode="U") as f:
   |
help: Remove mode argument
   |
42 | open(name="foo", mode="U")
   - open(mode="U", name="foo")
43 + open(name="foo")
44 |
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:45:23
   |
43 | open(mode="U", name="foo")
44 |
45 | with open("foo", mode="U") as f:
   |                       ^^^
46 |     pass
47 | with open(name="foo", mode="U") as f:
   |
help: Remove mode argument
   |
44 |
   - with open("foo", mode="U") as f:
45 + with open("foo") as f:
46 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:47:28
   |
45 | with open("foo", mode="U") as f:
46 |     pass
47 | with open(name="foo", mode="U") as f:
   |                            ^^^
48 |     pass
49 | with open(mode="U", name="foo") as f:
   |
help: Remove mode argument
   |
46 |     pass
   - with open(name="foo", mode="U") as f:
47 + with open(name="foo") as f:
48 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:49:16
   |
47 | with open(name="foo", mode="U") as f:
48 |     pass
49 | with open(mode="U", name="foo") as f:
   |                ^^^
50 |     pass
   |
help: Remove mode argument
   |
48 |     pass
   - with open(mode="U", name="foo") as f:
49 + with open(name="foo") as f:
50 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:52:18
   |
50 |     pass
51 |
52 | open("foo", mode="Ub")
   |                  ^^^^
53 | open(name="foo", mode="Ub")
54 | open(mode="Ub", name="foo")
   |
help: Replace with `rb`
   |
51 |
   - open("foo", mode="Ub")
52 + open("foo", mode="rb")
53 | open(name="foo", mode="Ub")
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:53:23
   |
52 | open("foo", mode="Ub")
53 | open(name="foo", mode="Ub")
   |                       ^^^^
54 | open(mode="Ub", name="foo")
   |
help: Replace with `rb`
   |
52 | open("foo", mode="Ub")
   - open(name="foo", mode="Ub")
53 + open(name="foo", mode="rb")
54 | open(mode="Ub", name="foo")
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:54:11
   |
52 | open("foo", mode="Ub")
53 | open(name="foo", mode="Ub")
54 | open(mode="Ub", name="foo")
   |           ^^^^
55 |
56 | with open("foo", mode="Ub") as f:
   |
help: Replace with `rb`
   |
53 | open(name="foo", mode="Ub")
   - open(mode="Ub", name="foo")
54 + open(mode="rb", name="foo")
55 |
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:56:23
   |
54 | open(mode="Ub", name="foo")
55 |
56 | with open("foo", mode="Ub") as f:
   |                       ^^^^
57 |     pass
58 | with open(name="foo", mode="Ub") as f:
   |
help: Replace with `rb`
   |
55 |
   - with open("foo", mode="Ub") as f:
56 + with open("foo", mode="rb") as f:
57 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:58:28
   |
56 | with open("foo", mode="Ub") as f:
57 |     pass
58 | with open(name="foo", mode="Ub") as f:
   |                            ^^^^
59 |     pass
60 | with open(mode="Ub", name="foo") as f:
   |
help: Replace with `rb`
   |
57 |     pass
   - with open(name="foo", mode="Ub") as f:
58 + with open(name="foo", mode="rb") as f:
59 |     pass
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:60:16
   |
58 | with open(name="foo", mode="Ub") as f:
59 |     pass
60 | with open(mode="Ub", name="foo") as f:
   |                ^^^^
61 |     pass
   |
help: Replace with `rb`
   |
59 |     pass
   - with open(mode="Ub", name="foo") as f:
60 + with open(mode="rb", name="foo") as f:
61 |     pass
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:63:23
   |
61 |     pass
62 |
63 | open(file="foo", mode='U', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |                       ^^^
64 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
65 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
   |
help: Remove mode argument
   |
62 |
   - open(file="foo", mode='U', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
63 + open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
64 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:64:106
   |
63 | open(file="foo", mode='U', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
64 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
   |                                                                                                          ^^^
65 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
66 | open(mode='U', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |
help: Remove mode argument
   |
63 | open(file="foo", mode='U', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   - open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
64 + open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
65 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:65:65
   |
63 | open(file="foo", mode='U', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
64 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
65 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
   |                                                                 ^^^
66 | open(mode='U', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |
help: Remove mode argument
   |
64 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
   - open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
65 + open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
66 | open(mode='U', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:66:11
   |
64 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='U')
65 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
66 | open(mode='U', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |           ^^^
67 |
68 | open(file="foo", mode='Ub', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |
help: Remove mode argument
   |
65 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='U', newline=None, closefd=True, opener=None)
   - open(mode='U', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
66 + open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
67 |
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:68:23
   |
66 | open(mode='U', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
67 |
68 | open(file="foo", mode='Ub', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |                       ^^^^
69 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
70 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
   |
help: Replace with `rb`
   |
67 |
   - open(file="foo", mode='Ub', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
68 + open(file="foo", mode="rb", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
69 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:69:106
   |
68 | open(file="foo", mode='Ub', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
69 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
   |                                                                                                          ^^^^
70 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
71 | open(mode='Ub', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |
help: Replace with `rb`
   |
68 | open(file="foo", mode='Ub', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   - open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
69 + open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode="rb")
70 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:70:65
   |
68 | open(file="foo", mode='Ub', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
69 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
70 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
   |                                                                 ^^^^
71 | open(mode='Ub', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |
help: Replace with `rb`
   |
69 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
   - open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
70 + open(file="foo", buffering=-1, encoding=None, errors=None, mode="rb", newline=None, closefd=True, opener=None)
71 | open(mode='Ub', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |

UP015 [*] Unnecessary modes, use `rb`
  --> UP015.py:71:11
   |
69 | open(file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None, mode='Ub')
70 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
71 | open(mode='Ub', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
   |           ^^^^
72 |
73 | import aiofiles
   |
help: Replace with `rb`
   |
70 | open(file="foo", buffering=-1, encoding=None, errors=None, mode='Ub', newline=None, closefd=True, opener=None)
   - open(mode='Ub', file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
71 + open(mode="rb", file="foo", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
72 |
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:75:22
   |
73 | import aiofiles
74 |
75 | aiofiles.open("foo", "U")
   |                      ^^^
76 | aiofiles.open("foo", "r")
77 | aiofiles.open("foo", mode="r")
   |
help: Remove mode argument
   |
74 |
   - aiofiles.open("foo", "U")
75 + aiofiles.open("foo")
76 | aiofiles.open("foo", "r")
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:76:22
   |
75 | aiofiles.open("foo", "U")
76 | aiofiles.open("foo", "r")
   |                      ^^^
77 | aiofiles.open("foo", mode="r")
   |
help: Remove mode argument
   |
75 | aiofiles.open("foo", "U")
   - aiofiles.open("foo", "r")
76 + aiofiles.open("foo")
77 | aiofiles.open("foo", mode="r")
   |

UP015 [*] Unnecessary mode argument
  --> UP015.py:77:27
   |
75 | aiofiles.open("foo", "U")
76 | aiofiles.open("foo", "r")
77 | aiofiles.open("foo", mode="r")
   |                           ^^^
78 |
79 | open("foo", "r+")
   |
help: Remove mode argument
   |
76 | aiofiles.open("foo", "r")
   - aiofiles.open("foo", mode="r")
77 + aiofiles.open("foo")
78 |
   |
