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.1 it 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 in pyptoject.toml.
Due to this change I did not commit my poetry.lock file
We need to increase the version of mypy to 0.812 in order to get sqlalchemy2-stubs works with - updated the pyproject.toml accordingly.
As the dependency of sqlalchemy is a local path, I have cloned the master branch of sqlalchemy and started to work on it(current version is 1.4.16)
What I did so far:
The mypy.ini file 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 :)
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:2.0.0-alpha.1
it 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
.poetry.lock
filemypy
to0.812
in order to getsqlalchemy2-stubs
works with - updated thepyproject.toml
accordingly.sqlalchemy
is a local path, I have cloned the master branch ofsqlalchemy
and started to work on it(current version is1.4.16
)What I did so far:
mypy.ini
file with "strict" mode is added.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 thecast
method also returns Any type :)