---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI014 [*] Only simple default values allowed for arguments
 --> PYI014.pyi:3:7
  |
1 | def f12(
2 |     x,
3 |     y=os.pathsep,  # Error PYI014
  |       ^^^^^^^^^^
4 | ) -> None: ...
5 | def f11(*, x="x") -> None: ...  # OK
  |
help: Replace default value with `...`
  |
2 |     x,
  -     y=os.pathsep,  # Error PYI014
3 +     y=...,  # Error PYI014
4 | ) -> None: ...
  |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:29:7
   |
27 |   def f151(x={1: 2}) -> None: ...
28 |   def f152(
29 |       x={  # Error PYI014
   |  _______^
30 | |         1: 2,
31 | |         **{3: 4},
32 | |     }
   | |_____^
33 |   ) -> None: ...
34 |   def f153(
   |
help: Replace default value with `...`
   |
28 | def f152(
   -     x={  # Error PYI014
   -         1: 2,
   -         **{3: 4},
   -     }
29 +     x=...
30 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:35:7
   |
33 |   ) -> None: ...
34 |   def f153(
35 |       x=[  # Error PYI014
   |  _______^
36 | |         1,
37 | |         2,
38 | |         3,
39 | |         4,
40 | |         5,
41 | |         6,
42 | |         7,
43 | |         8,
44 | |         9,
45 | |         10,
46 | |         11,
47 | |     ]
   | |_____^
48 |   ) -> None: ...
49 |   def f154(
   |
help: Replace default value with `...`
   |
34 | def f153(
   -     x=[  # Error PYI014
   -         1,
   -         2,
   -         3,
   -         4,
   -         5,
   -         6,
   -         7,
   -         8,
   -         9,
   -         10,
   -         11,
   -     ]
35 +     x=...
36 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:50:7
   |
48 |   ) -> None: ...
49 |   def f154(
50 |       x=(  # Error PYI014
   |  _______^
51 | |         "foo",
52 | |         ("bar", "baz"),
53 | |     )
   | |_____^
54 |   ) -> None: ...
55 |   def f141(
   |
help: Replace default value with `...`
   |
49 | def f154(
   -     x=(  # Error PYI014
   -         "foo",
   -         ("bar", "baz"),
   -     )
50 +     x=...
51 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:56:7
   |
54 | ) -> None: ...
55 | def f141(
56 |     x=[*range(10)],  # Error PYI014
   |       ^^^^^^^^^^^^
57 | ) -> None: ...
58 | def f142(
   |
help: Replace default value with `...`
   |
55 | def f141(
   -     x=[*range(10)],  # Error PYI014
56 +     x=...,  # Error PYI014
57 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:59:7
   |
57 | ) -> None: ...
58 | def f142(
59 |     x=list(range(10)),  # Error PYI014
   |       ^^^^^^^^^^^^^^^
60 | ) -> None: ...
61 | def f16(x=frozenset({b"foo", b"bar", b"baz"})) -> None: ...  # Error PYI014
   |
help: Replace default value with `...`
   |
58 | def f142(
   -     x=list(range(10)),  # Error PYI014
59 +     x=...,  # Error PYI014
60 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:61:11
   |
59 |     x=list(range(10)),  # Error PYI014
60 | ) -> None: ...
61 | def f16(x=frozenset({b"foo", b"bar", b"baz"})) -> None: ...  # Error PYI014
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
62 | def f17(
63 |     x="foo" + "bar",  # Error PYI014
   |
help: Replace default value with `...`
   |
60 | ) -> None: ...
   - def f16(x=frozenset({b"foo", b"bar", b"baz"})) -> None: ...  # Error PYI014
61 + def f16(x=...) -> None: ...  # Error PYI014
62 | def f17(
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:63:7
   |
61 | def f16(x=frozenset({b"foo", b"bar", b"baz"})) -> None: ...  # Error PYI014
62 | def f17(
63 |     x="foo" + "bar",  # Error PYI014
   |       ^^^^^^^^^^^^^
64 | ) -> None: ...
65 | def f18(
   |
help: Replace default value with `...`
   |
62 | def f17(
   -     x="foo" + "bar",  # Error PYI014
63 +     x=...,  # Error PYI014
64 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:66:7
   |
64 | ) -> None: ...
65 | def f18(
66 |     x=b"foo" + b"bar",  # Error PYI014
   |       ^^^^^^^^^^^^^^^
67 | ) -> None: ...
68 | def f19(
   |
help: Replace default value with `...`
   |
65 | def f18(
   -     x=b"foo" + b"bar",  # Error PYI014
66 +     x=...,  # Error PYI014
67 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:69:7
   |
67 | ) -> None: ...
68 | def f19(
69 |     x="foo" + 4,  # Error PYI014
   |       ^^^^^^^^^
70 | ) -> None: ...
71 | def f20(
   |
help: Replace default value with `...`
   |
68 | def f19(
   -     x="foo" + 4,  # Error PYI014
69 +     x=...,  # Error PYI014
70 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:72:7
   |
70 | ) -> None: ...
71 | def f20(
72 |     x=5 + 5,  # Error PYI014
   |       ^^^^^
73 | ) -> None: ...
74 | def f21(
   |
help: Replace default value with `...`
   |
71 | def f20(
   -     x=5 + 5,  # Error PYI014
72 +     x=...,  # Error PYI014
73 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:75:7
   |
73 | ) -> None: ...
74 | def f21(
75 |     x=3j - 3j,  # Error PYI014
   |       ^^^^^^^
76 | ) -> None: ...
77 | def f22(
   |
help: Replace default value with `...`
   |
74 | def f21(
   -     x=3j - 3j,  # Error PYI014
75 +     x=...,  # Error PYI014
76 | ) -> None: ...
   |

PYI014 [*] Only simple default values allowed for arguments
  --> PYI014.pyi:78:7
   |
76 | ) -> None: ...
77 | def f22(
78 |     x=-42.5j + 4.3j,  # Error PYI014
   |       ^^^^^^^^^^^^^
79 | ) -> None: ...
80 | def f23(
   |
help: Replace default value with `...`
   |
77 | def f22(
   -     x=-42.5j + 4.3j,  # Error PYI014
78 +     x=...,  # Error PYI014
79 | ) -> None: ...
   |
