Skip to content

Commit 7617238

Browse files
committed
Update preview flake8-use-pathlib snapshots
1 parent 12092d4 commit 7617238

4 files changed

Lines changed: 8 additions & 104 deletions

crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview__PTH203_PTH203.py.snap

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/ruff_linter/src/rules/flake8_use_pathlib/mod.rs
3+
assertion_line: 172
34
---
45
PTH203 [*] `os.path.getatime` should be replaced by `Path.stat().st_atime`
56
--> PTH203.py:5:1
@@ -21,24 +22,6 @@ help: Replace with `Path.stat(...).st_atime`
2122
7 | os.path.getatime(Path("filename"))
2223
8 |
2324

24-
PTH203 [*] `os.path.getatime` should be replaced by `Path.stat().st_atime`
25-
--> PTH203.py:6:1
26-
|
27-
5 | os.path.getatime("filename")
28-
6 | os.path.getatime(b"filename")
29-
| ^^^^^^^^^^^^^^^^
30-
7 | os.path.getatime(Path("filename"))
31-
|
32-
help: Replace with `Path.stat(...).st_atime`
33-
3 | from os.path import getatime
34-
4 |
35-
5 | os.path.getatime("filename")
36-
- os.path.getatime(b"filename")
37-
6 + Path(b"filename").stat().st_atime
38-
7 | os.path.getatime(Path("filename"))
39-
8 |
40-
9 |
41-
4225
PTH203 [*] `os.path.getatime` should be replaced by `Path.stat().st_atime`
4326
--> PTH203.py:7:1
4427
|
@@ -75,24 +58,6 @@ help: Replace with `Path.stat(...).st_atime`
7558
12 | getatime(Path("filename"))
7659
13 |
7760

78-
PTH203 [*] `os.path.getatime` should be replaced by `Path.stat().st_atime`
79-
--> PTH203.py:11:1
80-
|
81-
10 | getatime("filename")
82-
11 | getatime(b"filename")
83-
| ^^^^^^^^
84-
12 | getatime(Path("filename"))
85-
|
86-
help: Replace with `Path.stat(...).st_atime`
87-
8 |
88-
9 |
89-
10 | getatime("filename")
90-
- getatime(b"filename")
91-
11 + Path(b"filename").stat().st_atime
92-
12 | getatime(Path("filename"))
93-
13 |
94-
14 |
95-
9661
PTH203 [*] `os.path.getatime` should be replaced by `Path.stat().st_atime`
9762
--> PTH203.py:12:1
9863
|

crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview__PTH204_PTH204.py.snap

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/ruff_linter/src/rules/flake8_use_pathlib/mod.rs
3+
assertion_line: 172
34
---
45
PTH204 [*] `os.path.getmtime` should be replaced by `Path.stat().st_mtime`
56
--> PTH204.py:6:1
@@ -19,24 +20,6 @@ help: Replace with `Path.stat(...).st_mtime`
1920
8 | os.path.getmtime(Path("filename"))
2021
9 |
2122

22-
PTH204 [*] `os.path.getmtime` should be replaced by `Path.stat().st_mtime`
23-
--> PTH204.py:7:1
24-
|
25-
6 | os.path.getmtime("filename")
26-
7 | os.path.getmtime(b"filename")
27-
| ^^^^^^^^^^^^^^^^
28-
8 | os.path.getmtime(Path("filename"))
29-
|
30-
help: Replace with `Path.stat(...).st_mtime`
31-
4 |
32-
5 |
33-
6 | os.path.getmtime("filename")
34-
- os.path.getmtime(b"filename")
35-
7 + Path(b"filename").stat().st_mtime
36-
8 | os.path.getmtime(Path("filename"))
37-
9 |
38-
10 |
39-
4023
PTH204 [*] `os.path.getmtime` should be replaced by `Path.stat().st_mtime`
4124
--> PTH204.py:8:1
4225
|
@@ -72,22 +55,6 @@ help: Replace with `Path.stat(...).st_mtime`
7255
12 | getmtime(b"filename")
7356
13 | getmtime(Path("filename"))
7457

75-
PTH204 [*] `os.path.getmtime` should be replaced by `Path.stat().st_mtime`
76-
--> PTH204.py:12:1
77-
|
78-
11 | getmtime("filename")
79-
12 | getmtime(b"filename")
80-
| ^^^^^^^^
81-
13 | getmtime(Path("filename"))
82-
|
83-
help: Replace with `Path.stat(...).st_mtime`
84-
9 |
85-
10 |
86-
11 | getmtime("filename")
87-
- getmtime(b"filename")
88-
12 + Path(b"filename").stat().st_mtime
89-
13 | getmtime(Path("filename"))
90-
9158
PTH204 [*] `os.path.getmtime` should be replaced by `Path.stat().st_mtime`
9259
--> PTH204.py:13:1
9360
|

crates/ruff_linter/src/rules/flake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__preview__PTH205_PTH205.py.snap

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
source: crates/ruff_linter/src/rules/flake8_use_pathlib/mod.rs
3+
assertion_line: 172
34
---
45
PTH205 [*] `os.path.getctime` should be replaced by `Path.stat().st_ctime`
56
--> PTH205.py:6:1
@@ -19,24 +20,6 @@ help: Replace with `Path.stat(...).st_ctime`
1920
8 | os.path.getctime(Path("filename"))
2021
9 |
2122

22-
PTH205 [*] `os.path.getctime` should be replaced by `Path.stat().st_ctime`
23-
--> PTH205.py:7:1
24-
|
25-
6 | os.path.getctime("filename")
26-
7 | os.path.getctime(b"filename")
27-
| ^^^^^^^^^^^^^^^^
28-
8 | os.path.getctime(Path("filename"))
29-
|
30-
help: Replace with `Path.stat(...).st_ctime`
31-
4 |
32-
5 |
33-
6 | os.path.getctime("filename")
34-
- os.path.getctime(b"filename")
35-
7 + Path(b"filename").stat().st_ctime
36-
8 | os.path.getctime(Path("filename"))
37-
9 |
38-
10 | getctime("filename")
39-
4023
PTH205 [*] `os.path.getctime` should be replaced by `Path.stat().st_ctime`
4124
--> PTH205.py:8:1
4225
|
@@ -76,22 +59,6 @@ help: Replace with `Path.stat(...).st_ctime`
7659
11 | getctime(b"filename")
7760
12 | getctime(Path("filename"))
7861

79-
PTH205 [*] `os.path.getctime` should be replaced by `Path.stat().st_ctime`
80-
--> PTH205.py:11:1
81-
|
82-
10 | getctime("filename")
83-
11 | getctime(b"filename")
84-
| ^^^^^^^^
85-
12 | getctime(Path("filename"))
86-
|
87-
help: Replace with `Path.stat(...).st_ctime`
88-
8 | os.path.getctime(Path("filename"))
89-
9 |
90-
10 | getctime("filename")
91-
- getctime(b"filename")
92-
11 + Path(b"filename").stat().st_ctime
93-
12 | getctime(Path("filename"))
94-
9562
PTH205 [*] `os.path.getctime` should be replaced by `Path.stat().st_ctime`
9663
--> PTH205.py:12:1
9764
|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: crates/ruff_linter/src/rules/flake8_use_pathlib/mod.rs
3+
assertion_line: 148
4+
---
5+

0 commit comments

Comments
 (0)