Skip to content

Commit

Permalink
fix up comments
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Sep 12, 2022
1 parent cbd41d2 commit 2846723
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion core/dbt/context/context_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def get_config_dict(self, resource_type: NodeType) -> Dict[str, Any]:
model_configs = unrendered.get("exposures")
else:
model_configs = unrendered.get("models")
# by the time it get here enabled should be false when set at project level
if model_configs is None:
return {}
else:
Expand Down
6 changes: 2 additions & 4 deletions core/dbt/parser/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ def load(self):
self.manifest.rebuild_disabled_lookup()

# Load yaml files
# sources get added to manifest here
parser_types = [SchemaParser]
for project in self.all_projects.values():
if project.project_name not in project_parser_files:
Expand All @@ -380,13 +379,12 @@ def load(self):
self._perf_info.patch_sources_elapsed = time.perf_counter() - start_patch

# We need to rebuild disabled in order to include disabled sources
# This is where disabled sources get removed from the manifest
self.manifest.rebuild_disabled_lookup()

# copy the selectors from the root_project to the manifest
self.manifest.selectors = self.root_project.manifest_selectors

# update the refs, sources, docs and metrics (TODO: exposures?)
# update the refs, sources, docs and metrics depends_on.nodes
# These check the created_at time on the nodes to
# determine whether they need processing.
start_process = time.perf_counter()
Expand Down Expand Up @@ -1146,7 +1144,7 @@ def _process_refs_for_metric(manifest: Manifest, current_project: str, metric: P

if target_model is None or isinstance(target_model, Disabled):
# This may raise. Even if it doesn't, we don't want to add
# this exposure to the graph b/c there is no destination exposure
# this metric to the graph b/c there is no destination metric
metric.config.enabled = False
invalid_ref_fail_unless_test(
metric,
Expand Down
6 changes: 1 addition & 5 deletions core/dbt/parser/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,12 +1050,8 @@ def _generate_exposure_config(

# configs with precendence set
precedence_configs = dict()
# first apply exposure configs
# apply exposure configs
precedence_configs.update(target.config)
# then overwite anything that is defined on exposure
# this is not quite complex enough for configs that can be set as top-level node keys, but
# it works while exposure configs can only include `enabled`.
# precedence_configs.update(target.config)

return generator.calculate_node_config(
config_call_dict={},
Expand Down

0 comments on commit 2846723

Please sign in to comment.