- name: Install Python webservers
run: pip3 install falcon sanic sanic-testing sanic-cors starlette
- - name: Install latest pylint/mypy
- run: pip3 install -U pylint mypy types-PyYAML types-jinja2 types-psycopg2 types-psutil types-requests types-ujson typing-extensions asgi_lifespan sqlalchemy2-stubs
+ - name: Install latest pylint
+ run: pip3 install -U pylint asgi_lifespan
- name: PHP linting
run: phpcs --report-width=120 .
python3 -m behave -DREMOVE_TEMPLATE=1 -DBUILDDIR=$GITHUB_WORKSPACE/build --format=progress3
working-directory: Nominatim/test/bdd
- - name: Install newer Python packages (for typechecking info)
- run: pip3 install -U osmium uvicorn
+ - name: Install mypy and typechecking info
+ run: pip3 install -U mypy osmium uvicorn types-PyYAML types-jinja2 types-psycopg2 types-psutil types-requests types-ujson typing-extensions
if: matrix.flavour != 'oldstuff'
- name: Python static typechecking
pip3 install --user behave mkdocs mkdocstrings pytest pylint \
mypy types-PyYAML types-jinja2 types-psycopg2 types-psutil \
- types-ujosn \
+ types-ujosn types-requests typing-extensions\
sanic-testing httpx asgi-lifespan
```
async def execute(self, sql: sa.sql.base.Executable,
params: Union[Mapping[str, Any], Sequence[Mapping[str, Any]], None] = None
- ) -> sa.engine.Result:
+ ) -> 'sa.engine.Result[Any]':
""" Execute a 'execute()' query on the connection.
"""
return await self.connection.execute(sql, params)
self.server_version = 0
if self.server_version >= 110000:
- @sa.event.listens_for(engine.sync_engine, "connect") # type: ignore[misc]
+ @sa.event.listens_for(engine.sync_engine, "connect")
def _on_connect(dbapi_con: Any, _: Any) -> None:
cursor = dbapi_con.cursor()
cursor.execute("SET jit_above_cost TO '-1'")