diff --git a/rope/contrib/autoimport/sqlite.py b/rope/contrib/autoimport/sqlite.py index 5791ea977..f02d426ba 100644 --- a/rope/contrib/autoimport/sqlite.py +++ b/rope/contrib/autoimport/sqlite.py @@ -155,6 +155,7 @@ def create_database_connection( memory : bool if true, don't persist to disk """ + def calculate_project_hash(data: str) -> str: return sha256(data.encode()).hexdigest() @@ -171,7 +172,7 @@ def calculate_project_hash(data: str) -> str: else: project_hash = calculate_project_hash(project.ropefolder.real_path) return sqlite3.connect( - f"file:memdb{project_hash}:?mode=memory&cache=shared", uri=True + f"file:rope-{project_hash}:?mode=memory&cache=shared", uri=True ) else: return sqlite3.connect(