Skip to content

Commit

Permalink
Updated flag name to fit behavior change standards
Browse files Browse the repository at this point in the history
  • Loading branch information
DevonFulcher committed Oct 31, 2024
1 parent 175714d commit 2e6f4bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/dbt/contracts/graph/semantic_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def validate(self) -> bool:

semantic_manifest = self._get_pydantic_semantic_manifest()

if get_flags().allow_legacy_mf_cumulative_type_params is False:
if get_flags().require_nested_cumulative_type_params is False:
metrics_using_old_params: Set[str] = set()
for metric in semantic_manifest.metrics or []:
for field in ("window", "grain_to_date"):
Expand Down
4 changes: 2 additions & 2 deletions core/dbt/contracts/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class ProjectFlags(ExtensibleDbtClassMixin):
state_modified_compare_more_unrendered_values: bool = False
state_modified_compare_vars: bool = False
require_yaml_configuration_for_mf_time_spines: bool = False
allow_legacy_mf_cumulative_type_params: bool = False
require_nested_cumulative_type_params: bool = False

@property
def project_only_flags(self) -> Dict[str, Any]:
Expand All @@ -357,7 +357,7 @@ def project_only_flags(self) -> Dict[str, Any]:
"state_modified_compare_more_unrendered_values": self.state_modified_compare_more_unrendered_values,
"state_modified_compare_vars": self.state_modified_compare_vars,
"require_yaml_configuration_for_mf_time_spines": self.require_yaml_configuration_for_mf_time_spines,
"allow_legacy_mf_cumulative_type_params": self.allow_legacy_mf_cumulative_type_params,
"require_nested_cumulative_type_params": self.require_nested_cumulative_type_params,
}


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/contracts/graph/test_semantic_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_deprecate_cumulative_type_params(self, manifest: Manifest, metric: Metr
with patch("dbt.contracts.graph.semantic_manifest.get_flags") as patched_get_flags, patch(
"dbt.contracts.graph.semantic_manifest.deprecations"
) as patched_deprecations:
patched_get_flags.return_value.allow_legacy_mf_cumulative_type_params = False
patched_get_flags.return_value.require_nested_cumulative_type_params = False
manifest.metrics[metric.unique_id] = metric
sm_manifest = SemanticManifest(manifest)
assert sm_manifest.validate()
Expand Down

0 comments on commit 2e6f4bc

Please sign in to comment.