schemainspect icon indicating copy to clipboard operation
schemainspect copied to clipboard

Use PEP 484 / Mypy type annotations as part of CI

Open SKalt opened this issue 4 years ago • 1 comments

Using Python3.6+ type annotations would require documenting and refactoring, as requested in #40

SKalt avatar Jan 20 '20 20:01 SKalt

I've got a mostly-done WIP at skalt/mypy-annotations. I could use some help on the lines marked FIXME or containing type Any. Here's a sample of the questions I've got:

  • def names_and_types(cols: Dict[str, Any]) -> List[Tuple[str, Any]]:: What's c.dbtype?
  • in def to_pytype(sqla_dialect: postgresql, typename: str), what's the type of the sqla_dialect.ischema_names.items()?
  • Should InspectedSequence.__eq__ accept any instance of Inspected?
  • What are the types of aruments to __init__? Unfotunatly, I've got this function for ... pretty much every class.

SKalt avatar Jan 31 '20 13:01 SKalt