Skip to content

Commit

Permalink
Organize code
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailsimsek committed Sep 8, 2024
1 parent 79b0dda commit 13a97d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions opendbt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
# ================================================================================================================
from opendbt.overrides import common

if Version(get_dbt_version().to_version_string(skip_matcher=True)) > Version("1.8.0"):
dbt.task.docs.generate.GenerateTask = common.OpenDbtGenerateTask
else:
if Version(get_dbt_version().to_version_string(skip_matcher=True)) < Version("1.8.0"):
dbt.task.generate.GenerateTask = common.OpenDbtGenerateTask
else:
dbt.task.docs.generate.GenerateTask = common.OpenDbtGenerateTask
factory.FACTORY = common.OpenDbtAdapterContainer()


Expand Down
8 changes: 4 additions & 4 deletions opendbt/overrides/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

from dbt.version import get_installed_version as get_dbt_version

if Version(get_dbt_version().to_version_string(skip_matcher=True)) > Version("1.8.0"):
from dbt.task.docs.generate import GenerateTask
from opendbt.overrides.dbt18 import AdapterContainerDbtOverride
else:
if Version(get_dbt_version().to_version_string(skip_matcher=True)) < Version("1.8.0"):
from dbt.task.generate import GenerateTask
from opendbt.overrides.dbt17 import AdapterContainerDbtOverride
else:
from dbt.task.docs.generate import GenerateTask
from opendbt.overrides.dbt18 import AdapterContainerDbtOverride


class OpenDbtAdapterContainer(AdapterContainerDbtOverride):
Expand Down

0 comments on commit 13a97d0

Please sign in to comment.