diff options
author | CaselIT <cfederico87@gmail.com> | 2021-09-06 23:22:30 +0200 |
---|---|---|
committer | CaselIT <cfederico87@gmail.com> | 2021-09-14 21:57:20 +0200 |
commit | 921249d610d3a6e4c9028f459fa981492c50e724 (patch) | |
tree | 1123a35898e1441c199c925fcc7a8432e39a6f0e /tools | |
parent | 338fd68f1b33a143f9c9985be8b883f6ec4cd66d (diff) | |
download | alembic-921249d610d3a6e4c9028f459fa981492c50e724.tar.gz |
Added missing attributes from context stubs.
Fixes: #900
Change-Id: I2e21b6f363bf6405bd472c9aca04fbbc3c9cc384
Diffstat (limited to 'tools')
-rw-r--r-- | tools/write_pyi.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/write_pyi.py b/tools/write_pyi.py index df2a55f..60728a8 100644 --- a/tools/write_pyi.py +++ b/tools/write_pyi.py @@ -19,11 +19,9 @@ if True: # avoid flake/zimports messing with the order IGNORE_ITEMS = { "op": {"context", "create_module_class_proxy"}, "context": { - "config", "create_module_class_proxy", "get_impl", "requires_connection", - "script", }, } @@ -95,7 +93,8 @@ def generate_pyi_for_proxy( def _generate_stub_for_attr(cls, name, printer): - printer.writeline(f"{name}: Any") + type_ = cls.__annotations__.get(name, "Any") + printer.writeline(f"{name}: {type_}") def _generate_stub_for_meth(cls, name, printer): |