---
source: crates/ruff_linter/src/rules/refurb/mod.rs
---
FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
 --> FURB177.py:5:5
  |
4 | # Errors
5 | _ = Path().resolve()
  |     ^^^^^^^^^^^^^^^^
6 | _ = pathlib.Path().resolve()
  |
help: Replace `Path().resolve()` with `Path.cwd()`
  |
4 | # Errors
  - _ = Path().resolve()
5 + _ = Path.cwd()
6 | _ = pathlib.Path().resolve()
  |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
 --> FURB177.py:6:5
  |
4 | # Errors
5 | _ = Path().resolve()
6 | _ = pathlib.Path().resolve()
  |     ^^^^^^^^^^^^^^^^^^^^^^^^
7 |
8 | _ = Path("").resolve()
  |
help: Replace `Path().resolve()` with `Path.cwd()`
  |
5 | _ = Path().resolve()
  - _ = pathlib.Path().resolve()
6 + _ = Path.cwd()
7 |
  |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
 --> FURB177.py:8:5
  |
6 | _ = pathlib.Path().resolve()
7 |
8 | _ = Path("").resolve()
  |     ^^^^^^^^^^^^^^^^^^
9 | _ = pathlib.Path("").resolve()
  |
help: Replace `Path().resolve()` with `Path.cwd()`
  |
7 |
  - _ = Path("").resolve()
8 + _ = Path.cwd()
9 | _ = pathlib.Path("").resolve()
  |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:9:5
   |
 8 | _ = Path("").resolve()
 9 | _ = pathlib.Path("").resolve()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
10 |
11 | _ = Path(".").resolve()
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
8  | _ = Path("").resolve()
   - _ = pathlib.Path("").resolve()
9  + _ = Path.cwd()
10 |
   |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:11:5
   |
 9 | _ = pathlib.Path("").resolve()
10 |
11 | _ = Path(".").resolve()
   |     ^^^^^^^^^^^^^^^^^^^
12 | _ = pathlib.Path(".").resolve()
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
10 |
   - _ = Path(".").resolve()
11 + _ = Path.cwd()
12 | _ = pathlib.Path(".").resolve()
   |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:12:5
   |
11 | _ = Path(".").resolve()
12 | _ = pathlib.Path(".").resolve()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 |
14 | _ = Path("", **kwargs).resolve()
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
11 | _ = Path(".").resolve()
   - _ = pathlib.Path(".").resolve()
12 + _ = Path.cwd()
13 |
   |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:14:5
   |
12 | _ = pathlib.Path(".").resolve()
13 |
14 | _ = Path("", **kwargs).resolve()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 | _ = pathlib.Path("", **kwargs).resolve()
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
13 |
   - _ = Path("", **kwargs).resolve()
14 + _ = Path.cwd()
15 | _ = pathlib.Path("", **kwargs).resolve()
   |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:15:5
   |
14 | _ = Path("", **kwargs).resolve()
15 | _ = pathlib.Path("", **kwargs).resolve()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 |
17 | _ = Path(".", **kwargs).resolve()
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
14 | _ = Path("", **kwargs).resolve()
   - _ = pathlib.Path("", **kwargs).resolve()
15 + _ = Path.cwd()
16 |
   |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:17:5
   |
15 | _ = pathlib.Path("", **kwargs).resolve()
16 |
17 | _ = Path(".", **kwargs).resolve()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 | _ = pathlib.Path(".", **kwargs).resolve()
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
16 |
   - _ = Path(".", **kwargs).resolve()
17 + _ = Path.cwd()
18 | _ = pathlib.Path(".", **kwargs).resolve()
   |
note: This is an unsafe fix and may change runtime behavior

FURB177 [*] Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
  --> FURB177.py:18:5
   |
17 | _ = Path(".", **kwargs).resolve()
18 | _ = pathlib.Path(".", **kwargs).resolve()
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 |
20 | # OK
   |
help: Replace `Path().resolve()` with `Path.cwd()`
   |
17 | _ = Path(".", **kwargs).resolve()
   - _ = pathlib.Path(".", **kwargs).resolve()
18 + _ = Path.cwd()
19 |
   |
note: This is an unsafe fix and may change runtime behavior
