Skip to content

Commit

Permalink
Merge "Improve write_pyi usage" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeek authored and Gerrit Code Review committed Nov 6, 2024
2 parents 9bfca63 + f826aad commit 7fe422a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/write_pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import textwrap
import typing

sys.path.append(str(Path(__file__).parent.parent))

from alembic.autogenerate.api import AutogenContext
from alembic.ddl.impl import DefaultImpl
from alembic.runtime.migration import MigrationInfo

sys.path.append(str(Path(__file__).parent.parent))

if True: # avoid flake/zimports messing with the order
from alembic.operations.base import BatchOperations
from alembic.operations.base import Operations
Expand Down
9 changes: 9 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,12 @@ deps=
commands =
flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py {posargs}
black --check setup.py tests alembic

[testenv:write_pyi]
basepython = python3
deps=
sqlalchemy>=2
mako
zimports
black==24.1.1
commands = python tools/write_pyi.py

0 comments on commit 7fe422a

Please sign in to comment.