Skip to content

Commit

Permalink
Simplify user provided parametter usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek authored Jan 22, 2024
1 parent f903c8d commit dc9c82a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pyliquibase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ def __init__(self, defaultsFile: str,
"""

# if liquibaseDir is provided then switch to user provided liquibase.
if liquibaseDir:
self.liquibase_dir: str = liquibaseDir.rstrip("/")
self.version: str = "user-provided"
else:
self.version: str = version
self.liquibase_dir: str = resource_filename(__package__, LIQUIBASE_DIR.format(self.version))

# if liquibaseDir is provided then switch to user provided liquibase.
self.version: str = version if version else DEFAULT_LIQUIBASE_VERSION
self.liquibase_dir: str = liquibaseDir.rstrip("/") if liquibaseDir else resource_filename(__package__, LIQUIBASE_DIR.format(self.version))

self.args = []
if defaultsFile:
Expand Down

0 comments on commit dc9c82a

Please sign in to comment.