Skip to content

Commit

Permalink
Fixed pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
whitead committed Oct 6, 2023
1 parent 7f27e70 commit f82dbbd
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types:
- created
workflow_dispatch:

jobs:
publish:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
pip install .
- name: Run Test
run: |
pytest .
pytest .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ pre-commit install
pre-commit run --all-files
```

After that, it will run automatically
After that, it will run automatically
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pytest
pre-commit
pre-commit
4 changes: 3 additions & 1 deletion sanclone/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .state import State
from .version import __version__
from .state import State

__all__ = ["__version__", "State"]
2 changes: 1 addition & 1 deletion sanclone/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


class State(BaseModel):
pass
pass
4 changes: 3 additions & 1 deletion sanclone/tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .echo import EchoTool
from .echo import EchoTool

__all__ = ["EchoTool"]
4 changes: 2 additions & 2 deletions sanclone/tools/echo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from langchain.tools import BaseTool

from ..state import State


Expand All @@ -7,6 +8,5 @@ class EchoTool(BaseTool):
description = "An exampel tool that echoes what you input."
shared_state: State


def _run(self, query: str) -> str:
return query
return query
2 changes: 1 addition & 1 deletion sanclone/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.1"
__version__ = "0.0.1"
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from setuptools import setup

# so mypy can see version
__version__ = "0.0.0"

exec(open("sanclone/version.py").read())

with open("README.md", "r", encoding="utf-8") as fh:
Expand All @@ -20,6 +23,6 @@
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License"
"License :: OSI Approved :: MIT License",
],
)
5 changes: 3 additions & 2 deletions tests/test_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
def test_version():
assert sanclone.__version__


def test_echo_tool():
from sanclone.tools import EchoTool
from sanclone import State
from sanclone.tools import EchoTool

tool = EchoTool(shared_state=State())
assert tool.run("Hello") == "Hello"

0 comments on commit f82dbbd

Please sign in to comment.