From 09143f7146a776592035a53b828c00cd7d462747 Mon Sep 17 00:00:00 2001 From: Eternity Date: Sun, 27 Apr 2025 22:04:47 -0400 Subject: [PATCH] modified: dbml_sqlite/core.py Added support for pathlib `Path` object in function `validDBMLFile` --- dbml_sqlite/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbml_sqlite/core.py b/dbml_sqlite/core.py index 9dd5a83..f0157d4 100644 --- a/dbml_sqlite/core.py +++ b/dbml_sqlite/core.py @@ -53,10 +53,10 @@ def validDBMLFile(s): Returns: bool: True if s ends with '.dbml', else False. """ - if s.endswith('.dbml'): - return True + if isinstance(s, Path): + return s.suffix == '.dbml' else: - return False + return s.endswith('.dbml') def processFile(target, emulationMode, tableExists=True, indexExists=True, idxNameFunc=uuid.uuid4, join=True): """