Skip to content

Commit

Permalink
Get cache from disk to avoid cache overwriting.
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio authored Feb 20, 2023
1 parent 13b6fa7 commit 262b9fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pytest_isort/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ def pytest_sessionfinish(session):

# isort might not be enabled, lets check if we have a mtimes dict.
if hasattr(config, '_isort_mtimes'):
config.cache.set(MTIMES_HISTKEY, config._isort_mtimes)

cache = config.cache.get(HISTKEY, {})
cache.update(config._isort_mtimes)
config.cache.set(HISTKEY, cache)

try:
# isort>=5
Expand Down

0 comments on commit 262b9fc

Please sign in to comment.