---
source: crates/ruff_linter/src/rules/flake8_use_pathlib/mod.rs
---
PTH201 [*] Do not pass the current directory explicitly to `Path`
 --> PTH201.py:6:10
  |
5 | # match
6 | _ = Path(".")
  |          ^^^
7 | _ = pth(".")
8 | _ = PurePath(".")
  |
help: Remove the current directory argument
  |
5 | # match
  - _ = Path(".")
6 + _ = Path()
7 | _ = pth(".")
  |

PTH201 [*] Do not pass the current directory explicitly to `Path`
 --> PTH201.py:7:9
  |
5 | # match
6 | _ = Path(".")
7 | _ = pth(".")
  |         ^^^
8 | _ = PurePath(".")
9 | _ = Path("")
  |
help: Remove the current directory argument
  |
6 | _ = Path(".")
  - _ = pth(".")
7 + _ = pth()
8 | _ = PurePath(".")
  |

PTH201 [*] Do not pass the current directory explicitly to `Path`
 --> PTH201.py:8:14
  |
6 | _ = Path(".")
7 | _ = pth(".")
8 | _ = PurePath(".")
  |              ^^^
9 | _ = Path("")
  |
help: Remove the current directory argument
  |
7 | _ = pth(".")
  - _ = PurePath(".")
8 + _ = PurePath()
9 | _ = Path("")
  |

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:9:10
   |
 7 | _ = pth(".")
 8 | _ = PurePath(".")
 9 | _ = Path("")
   |          ^^
10 |
11 | Path('', )
   |
help: Remove the current directory argument
   |
8  | _ = PurePath(".")
   - _ = Path("")
9  + _ = Path()
10 |
   |

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:11:6
   |
 9 | _ = Path("")
10 |
11 | Path('', )
   |      ^^
12 |
13 | Path(
   |
help: Remove the current directory argument
   |
10 |
   - Path('', )
11 + Path()
12 |
   |

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:14:5
   |
13 | Path(
14 |     '',
   |     ^^
15 | )
   |
help: Remove the current directory argument
   |
12 |
   - Path(
   -     '',
   - )
13 + Path()
14 |
   |

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:18:5
   |
17 | Path(  # Comment before argument
18 |     '',
   |     ^^
19 | )
   |
help: Remove the current directory argument
   |
16 |
   - Path(  # Comment before argument
   -     '',
   - )
17 + Path()
18 |
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:22:5
   |
21 | Path(
22 |     '',  # EOL comment
   |     ^^
23 | )
   |
help: Remove the current directory argument
   |
20 |
   - Path(
   -     '',  # EOL comment
   - )
21 + Path()
22 |
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:26:5
   |
25 |   Path(
26 | /     ''  # Comment in the middle of implicitly concatenated string
27 | |     ".",
   | |_______^
28 |   )
   |
help: Remove the current directory argument
   |
24 |
   - Path(
   -     ''  # Comment in the middle of implicitly concatenated string
   -     ".",
   - )
25 + Path()
26 |
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:31:5
   |
30 | Path(
31 |     ''  # Comment before comma
   |     ^^
32 |     ,
33 | )
   |
help: Remove the current directory argument
   |
29 |
   - Path(
   -     ''  # Comment before comma
   -     ,
   - )
30 + Path()
31 |
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:36:5
   |
35 | Path(
36 |     '',
   |     ^^
37 | ) / "bare"
   |
help: Remove the current directory argument
   |
35 | Path(
   -     '',
   - ) / "bare"
36 +     "bare",
37 + )
38 |
   |

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:40:5
   |
39 | Path(  # Comment before argument
40 |     '',
   |     ^^
41 | ) / ("parenthesized")
   |
help: Remove the current directory argument
   |
39 | Path(  # Comment before argument
   -     '',
   - ) / ("parenthesized")
40 +     ("parenthesized"),
41 + )
42 |
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:44:5
   |
43 | Path(
44 |     '',  # EOL comment
   |     ^^
45 | ) / ( ("double parenthesized"  )   )
   |
help: Remove the current directory argument
   |
43 | Path(
   -     '',  # EOL comment
   - ) / ( ("double parenthesized"  )   )
44 +     ( ("double parenthesized"  )   ),  # EOL comment
45 + )
46 |
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:48:5
   |
47 |   (  Path(
48 | /     ''  # Comment in the middle of implicitly concatenated string
49 | |     ".",
   | |_______^
50 |   ) )/ (("parenthesized path call")
51 |         # Comment between closing parentheses
   |
help: Remove the current directory argument
   |
46 |
   - (  Path(
   -     ''  # Comment in the middle of implicitly concatenated string
   -     ".",
   - ) )/ (("parenthesized path call")
47 + Path(
48 +     (("parenthesized path call")
49 |       # Comment between closing parentheses
50 + ),
51 | )
   |
note: This is an unsafe fix and may change runtime behavior

PTH201 [*] Do not pass the current directory explicitly to `Path`
  --> PTH201.py:55:5
   |
54 | Path(
55 |     ''  # Comment before comma
   |     ^^
56 |     ,
57 | ) / "multiple" / (
   |
help: Remove the current directory argument
   |
54 | Path(
   -     ''  # Comment before comma
55 +     "multiple"  # Comment before comma
56 |     ,
   - ) / "multiple" / (
57 + ) / (
58 |     "frag"  # Comment
   |
note: This is an unsafe fix and may change runtime behavior
