Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed Jan 31, 2020
1 parent b030b4e commit 04ebdbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from dbt.contracts.graph.compiled import CompileResultNode
from dbt.contracts.util import Writable, Replaceable
from dbt.exceptions import (
raise_duplicate_resource_name, InternalException, raise_compiler_error
raise_duplicate_resource_name, InternalException, raise_compiler_error,
warn_or_error
)
from dbt.include.global_project import PACKAGES
from dbt.logger import GLOBAL_LOGGER as logger
Expand Down Expand Up @@ -593,14 +594,11 @@ def patch_macros(
continue
macro.patch(patch)

# log debug-level warning about nodes we couldn't find
if patches:
for patch in patches.values():
# since patches aren't nodes, we can't use the existing
# target_not_found warning
logger.debug((
'WARNING: Found documentation for macro "{}" which was '
'not found or is disabled').format(patch.name)
warn_or_error(
f'WARNING: Found documentation for macro "{patch.name}" '
f'which was not found'
)

def patch_nodes(
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def raise_duplicate_macro_patch_name(patch_1, patch_2):
raise_compiler_error(
f'dbt found two schema.yml entries for the same macro in package '
f'{package_name} named {name}. Macros may only be described a single '
f'time. To fix this, remove the macros entry for for {name} in one '
f'time. To fix this, remove the macros entry for {name} in one '
f'of these files:'
f'\n - {patch_1.original_file_path}\n - {patch_2.original_file_path}'
)
Expand Down
4 changes: 2 additions & 2 deletions core/dbt/parser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class ParserUtils:

@classmethod
def resolve_source(
cls, manifest: Manifest, target_source_name: Optional[str],
target_table_name: Optional[str], current_project: str,
cls, manifest: Manifest, target_source_name: str,
target_table_name: str, current_project: str,
node_package: str
) -> Optional[ParsedSourceDefinition]:
candidate_targets = [current_project, node_package, None]
Expand Down

0 comments on commit 04ebdbb

Please sign in to comment.