gino
gino copied to clipboard
Added typing support to json_support.py
As per our discussion, I have started to add typing support with json_support.py file,
and here are the notes we have on the way:
- As we have the version of
2.0.0-alpha.1it is impossible to install:gino[starlette, aiohttp, tornado, sanic, quart]as they are all required the gino version to be < 2.0.0. To proceed I have disabled them inpyptoject.toml. - Due to this change I did not commit my
poetry.lockfile - We need to increase the version of
mypyto0.812in order to getsqlalchemy2-stubsworks with - updated thepyproject.tomlaccordingly. - As the dependency of
sqlalchemyis a local path, I have cloned the master branch ofsqlalchemyand started to work on it(current version is1.4.16)
What I did so far:
- The
mypy.inifile with "strict" mode is added. - passed the mypy run for json_support.py file:
$ mypy src/gino/json_support.py
Success: no issues found in 1 source file
You should notice that most of the methods are accepting Any and returning Any, this is also true for sqlalchemy2-stubs base_exp is Any and astext is Any also it seems to be the cast method also returns Any type :)