diff --git a/README.md b/README.md index d32caeb..89e3647 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Spoffy -[![CircleCI](https://circleci.com/gh/steinitzu/spoffy/tree/master.svg?style=svg)](https://circleci.com/gh/steinitzu/spoffy/tree/master) [![Documentation Status](https://readthedocs.org/projects/spoffy/badge/?version=latest&style=flat-square)](https://spoffy.readthedocs.io/en/latest/?badge=latest) @@ -14,7 +13,7 @@ Read the docs: https://spoffy.readthedocs.io ``` pip install spoffy ``` -Python3.6 and newer are supported +Python3.9 and newer are supported diff --git a/codegen.py b/codegen.py index d313966..7c933f7 100644 --- a/codegen.py +++ b/codegen.py @@ -82,7 +82,7 @@ def signature_to_keywords(method): def build_method_def( - method: ast.FunctionDef + method: ast.FunctionDef, ) -> Tuple[ast.FunctionDef, ast.AsyncFunctionDef]: orig = method method = deepcopy(method) @@ -241,6 +241,6 @@ def build_classes(): out_body += classes out_tree = ast.Module(out_body) source = to_source(out_tree) - source = black.format_str(source, line_length=79) + source = black.format_str(source, mode=black.Mode(line_length=79)) output_file.write(source) print(source) diff --git a/poetry.lock b/poetry.lock index 25c7ef9..5c42849 100644 --- a/poetry.lock +++ b/poetry.lock @@ -123,13 +123,13 @@ files = [ [[package]] name = "astor" -version = "0.7.1" +version = "0.8.1" description = "Read/rewrite/write Python ASTs" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" files = [ - {file = "astor-0.7.1-py2.py3-none-any.whl", hash = "sha256:fb503b9e2fdd05609fbf557b916b4a7824171203701660f0c55bbf5a7a68713e"}, - {file = "astor-0.7.1.tar.gz", hash = "sha256:95c30d87a6c2cf89aa628b87398466840f0ad8652f88eb173125a6df8533fb8d"}, + {file = "astor-0.8.1-py2.py3-none-any.whl", hash = "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5"}, + {file = "astor-0.8.1.tar.gz", hash = "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e"}, ] [[package]] @@ -1268,5 +1268,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" -python-versions = "^3.8" -content-hash = "161b2510a72cc66d2e3a2eb3b59c9230df2635978dc8edbb851fcc0c17bfa78a" +python-versions = "^3.9" +content-hash = "10383e51a8a7cb07187a533ceacd5cacf82e0b84d31fd89aadcc6a23b372ba2c" diff --git a/pyproject.toml b/pyproject.toml index c1ef02f..2b02c85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ sphinx-autodoc-typehints = "^1.6" sphinx_rtd_theme = "^0.4.3" aiohttp = "^3.9" requests = "^2.21" -astor = "^0.7.1" +astor = "^0.8" pytest-asyncio = "^0.23.4" sphinxcontrib-asyncio = "^0.2.0" diff --git a/spoffy/client/common.py b/spoffy/client/common.py index e06f02b..0dec737 100644 --- a/spoffy/client/common.py +++ b/spoffy/client/common.py @@ -124,4 +124,4 @@ def load(self, response: Response, target): data = response.json if data is None: return None - return target(**data) + return data