From a9405eaf838842688262689d665f30ae3cebfdea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Lilleb=C3=B8=20Gundersen?= Date: Thu, 27 Oct 2022 11:05:20 +0200 Subject: [PATCH] feat: Support `Path` type for `project_root_path` Django has switched to using pathlib.Path in startproject. This adds support for these in the project root path config option. --- django_migration_linter/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_migration_linter/cache.py b/django_migration_linter/cache.py index aa777ee..9bdd1db 100644 --- a/django_migration_linter/cache.py +++ b/django_migration_linter/cache.py @@ -6,7 +6,7 @@ class Cache(dict): def __init__(self, django_folder, database, cache_path): self.filename = os.path.join( cache_path, - "{}_{}.pickle".format(django_folder.replace(os.sep, "_"), database), + "{}_{}.pickle".format(str(django_folder).replace(os.sep, "_"), database), ) if not os.path.exists(os.path.dirname(self.filename)):