Skip to content

Commit

Permalink
Add type hints to warn in deprecations.py
Browse files Browse the repository at this point in the history
The `warn` method id `deprecations.py` wasn't typed. Because of this,
calling to the method elsewhere would raise typing errors of calling
to an "untyped method"
  • Loading branch information
QMalcolm committed Aug 27, 2024
1 parent de25c04 commit fe25bcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/dbt/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def cb():
return cb


def warn(name, *args, **kwargs):
def warn(name: str, *args, **kwargs) -> None:
if name not in deprecations:
# this should (hopefully) never happen
raise RuntimeError("Error showing deprecation warning: {}".format(name))
Expand Down

0 comments on commit fe25bcd

Please sign in to comment.