Skip to content

Commit acb1cd3

Browse files
authored
bump version in setup.py to 0.7.0 (#22)
* bump version in setup.py to 0.7.0 * bump dependencies, fix mypy warning
1 parent 4fab0bc commit acb1cd3

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

dev-requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
mypy==0.910
2-
black==21.6b0
3-
isort==5.9.1
4-
flake8==3.9.2
5-
coverage==5.5
6-
pytest==6.2.4
7-
pytest-asyncio==0.15.1
1+
mypy==0.942
2+
black==22.3.0
3+
isort==5.10.1
4+
flake8==4.0.1
5+
coverage==6.3.2
6+
pytest==7.1.2
7+
pytest-asyncio==0.18.3

enochecker3/enochecker.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,9 @@ async def get(self, t: type) -> Any:
107107
args = await self._exit_stack.enter_async_context(
108108
self.checker._inject_dependencies(self.task, injector, None)
109109
)
110-
if isawaitable(injector):
111-
res = await injector(*args)
112-
else:
113-
res = injector(*args)
110+
res = injector(*args)
111+
if isawaitable(res):
112+
res = await res
114113

115114
if not hasattr(res, "__enter__") and not hasattr(res, "__aenter__"):
116115
return res
@@ -261,10 +260,10 @@ async def _inject_dependencies(
261260
async with self._inject_dependencies(
262261
task, injector, dependencies.union([v.annotation])
263262
) as args_:
264-
if isawaitable(injector):
265-
args.append(await injector(*args_))
266-
else:
267-
args.append(injector(*args_))
263+
arg = injector(*args_)
264+
if isawaitable(arg):
265+
arg = await arg
266+
args.append(arg)
268267

269268
async with AsyncExitStack() as stack:
270269
# new_args contains the return values of __(a)enter__, which would be the "x" in "(async) with ... as x:"

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
httpx>=0.18.2,<0.19.0
2-
motor[asyncio]>=2.4.0,<3.0.0
3-
fastapi>=0.65.2,<0.66.0
4-
uvicorn>=0.14.0,<0.15.0
1+
httpx>=0.22.0,<0.23.0
2+
motor[asyncio]>=2.5.1,<3.0.0
3+
fastapi>=0.75.2,<0.76.0
4+
uvicorn>=0.17.6,<0.18.0
55
gunicorn==20.1.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setuptools.setup(
1111
name="enochecker3",
12-
version="0.6.0",
12+
version="0.7.0",
1313
author="ldruschk",
1414
author_email="[email protected]",
1515
description="FastAPI based library for building async python checkers for the EnoEngine A/D CTF Framework",

0 commit comments

Comments
 (0)