Skip to content

Conversation

@ShahriyarR
Copy link
Contributor

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 :)

@ShahriyarR ShahriyarR closed this Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant