Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

Commit

Permalink
Cleans up docstring formatting by replacing @return/@param with :retu…
Browse files Browse the repository at this point in the history
…rn/:param
  • Loading branch information
elijahbenizzy committed Aug 29, 2022
1 parent 374922a commit 395d878
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions hamilton/dev_utils/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def __call__(self, fn: Callable):
TODO -- use @singledispatchmethod when we no longer support 3.6/3.7
https://docs.python.org/3/library/functools.html#functools.singledispatchmethod
@param fn: function (or class) to decorate
@return: The decorated function.
:param fn: function (or class) to decorate
:return: The decorated function.
"""
# In this case we just do a standard decorator
if isinstance(fn, types.FunctionType):
Expand Down
8 changes: 4 additions & 4 deletions hamilton/function_modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def value(literal_value: Any) -> LiteralDependency:
"""Specifies that a parameterized dependency comes from a "literal" source.
E.G. value("foo") means that the value is actually the string value "foo"
@param literal_value: Python literal value to use
@return: A LiteralDependency object -- a signifier to the internal framework of the dependency type
:param literal_value: Python literal value to use
:return: A LiteralDependency object -- a signifier to the internal framework of the dependency type
"""
if isinstance(literal_value, LiteralDependency):
return literal_value
Expand All @@ -85,8 +85,8 @@ def source(dependency_on: Any) -> UpstreamDependency:
This means that it comes from a node somewhere else.
E.G. source("foo") means that it should be assigned the value that "foo" outputs.
@param dependency_on: Upstream node to come from
@return:An UpstreamDependency object -- a signifier to the internal framework of the dependency type.
:param dependency_on: Upstream node to come from
:return:An UpstreamDependency object -- a signifier to the internal framework of the dependency type.
"""
if isinstance(dependency_on, UpstreamDependency):
return dependency_on
Expand Down

0 comments on commit 395d878

Please sign in to comment.