Skip to content

Commit

Permalink
fix the default source test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Aug 29, 2024
1 parent b9ad7c2 commit 8e919f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dbt_common/behavior_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ def _default_source() -> str:
If the maintainer did not provide a source, default to the module that called `register`.
For adapters, this will likely be `dbt.adapters.<foo>.impl` for `dbt-foo`.
"""
frame = inspect.stack()[5]
if module := inspect.getmodule(frame[0]):
return module.__name__
for frame in inspect.stack():
if module := inspect.getmodule(frame[0]):
if module.__name__ != __name__:
return module.__name__
return "Unknown"

def __bool__(self) -> bool:
Expand Down

0 comments on commit 8e919f5

Please sign in to comment.