Skip to content

Commit

Permalink
Revert inaccurate mypy change (dbt-labs#5216)
Browse files Browse the repository at this point in the history
  • Loading branch information
iknox-fa authored and Axel Goblet committed May 20, 2022
1 parent 197050d commit 56ef1aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/dbt/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import glob
import json
from pathlib import Path
from typing import Iterator, List, Optional, Tuple

import requests
Expand Down Expand Up @@ -226,13 +225,6 @@ def _get_adapter_plugin_names() -> Iterator[str]:
if spec is None or spec.submodule_search_locations is None:
return

# https://github.com/dbt-labs/dbt-core/pull/5171 changes how importing adapters works a bit and renders the previous discovery method useless for postgres.
# To solve this we manually add that path to the search path below.
# I don't like this solution. Not one bit.
# This can go away when we move the postgres adapter to it's own repo.
postgres_path = Path(__file__ + "/../../../plugins/postgres/dbt/adapters").resolve()
spec.submodule_search_locations.append(str(postgres_path))

for adapters_path in spec.submodule_search_locations:
version_glob = os.path.join(adapters_path, "*", "__version__.py")
for version_path in glob.glob(version_glob):
Expand Down
4 changes: 4 additions & 0 deletions test/integration/040_init_tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def schema(self):
def models(self):
return 'models'

# See CT-570 / GH 5180
@mark.skip(
reason="Broken because of https://github.com/dbt-labs/dbt-core/pull/5171"
)
@use_profile('postgres')
@mock.patch('click.confirm')
@mock.patch('click.prompt')
Expand Down

0 comments on commit 56ef1aa

Please sign in to comment.