Skip to content

Commit 90cfacd

Browse files
committed
Fix cache missing
1 parent 86a6311 commit 90cfacd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## Release 0.6.1
4+
5+
- Fix cache missing.
6+
37
## Release 0.6.0
48

59
- Upgrade pytest to 5.4+, fix a warning.

src/pytest_yapf3/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(self, *args, **kwargs):
110110

111111
def setup(self):
112112
"""Skip if the file is not changed since last success."""
113-
if self.__mtime == self.config.yapf_mtimes.get(self.name, 0):
113+
if self.__mtime == self.config.yapf_mtimes.get(self.nodeid, 0):
114114
pytest.skip("file(s) previously passed yapf checks")
115115

116116
def runtest(self):
@@ -126,7 +126,7 @@ def runtest(self):
126126
print_diff=True,
127127
)
128128
if not changed:
129-
self.config.yapf_mtimes[self.name] = self.__mtime
129+
self.config.yapf_mtimes[self.nodeid] = self.__mtime
130130
return
131131

132132
if self.show_diff:

0 commit comments

Comments
 (0)