Skip to content

Commit

Permalink
Some final annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Sep 9, 2024
1 parent 6bf126c commit b0485f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit/test_behavior_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from dbt_common.behavior_flags import Behavior
from dbt_common.exceptions.base import CompilationError
from unit.utils import EventCatcher


def test_behavior_default() -> None:
Expand Down Expand Up @@ -69,7 +70,7 @@ def test_behavior_flag_can_be_used_as_conditional() -> None:
assert True if behavior.flag_true else False


def test_behavior_flags_emit_deprecation_event_on_evaluation(event_catcher) -> None:
def test_behavior_flags_emit_deprecation_event_on_evaluation(event_catcher: EventCatcher) -> None:
behavior = Behavior(
[
{"name": "flag_false", "default": False},
Expand All @@ -89,7 +90,7 @@ def test_behavior_flags_emit_deprecation_event_on_evaluation(event_catcher) -> N
assert len(event_catcher.caught_events) == 1


def test_behavior_flags_emit_correct_deprecation_event(event_catcher) -> None:
def test_behavior_flags_emit_correct_deprecation_event(event_catcher: EventCatcher) -> None:
behavior = Behavior([{"name": "flag_false", "default": False}], {})

# trigger the evaluation
Expand All @@ -102,7 +103,7 @@ def test_behavior_flags_emit_correct_deprecation_event(event_catcher) -> None:
assert msg.data.flag_source == __name__ # defaults to the calling module


def test_behavior_flags_no_deprecation_event_on_no_warn(event_catcher) -> None:
def test_behavior_flags_no_deprecation_event_on_no_warn(event_catcher: EventCatcher) -> None:
behavior = Behavior([{"name": "flag_false", "default": False}], {})

# trigger the evaluation with no_warn, no event should fire
Expand Down

0 comments on commit b0485f9

Please sign in to comment.