Skip to content

Commit

Permalink
Use Ellipses in functions with docstrings (#109)
Browse files Browse the repository at this point in the history
* Ignore unnecessary ... error

* Add back ... to functions with docstring
  • Loading branch information
jackmpcollins authored Feb 19, 2024
1 parent 64c6514 commit 1028c8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ignore = [
"COM", # flake8-commas
"FA", # flake8-future-annotations
"INP", # flake8-no-pep420
"PIE790", # flake8-pie: Unnecessary `...` literal
"SLF", # flake8-self
"ARG", # flake8-unused-arguments
"TD", # flake8-todos
Expand Down
2 changes: 2 additions & 0 deletions tests/test_chatprompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def test_chatprompt_decorator_docstring():
@chatprompt(UserMessage("This is a user message."))
def func(one: int) -> str:
"""This is the docstring."""
...

assert isinstance(func, ChatPromptFunction)
assert getdoc(func) == "This is the docstring."
Expand Down Expand Up @@ -127,6 +128,7 @@ async def test_async_chatprompt_decorator_docstring():
@chatprompt(UserMessage("This is a user message."))
async def func(one: int) -> str:
"""This is the docstring."""
...

assert isinstance(func, AsyncChatPromptFunction)
assert getdoc(func) == "This is the docstring."
Expand Down

0 comments on commit 1028c8b

Please sign in to comment.