trinodb / trino-python-client

Python client for Trino
Apache License 2.0
328 stars 163 forks source link

[mypy] Enforce Mypy checks for a subset of modules #208

Closed john-bodley closed 1 year ago

john-bodley commented 2 years ago

Even though Mypy is enabled, per this pre-commit hook, the default options are fairly loose which allows for untyped methods and calls.

This PR aims to slowly start tightening the screws module by module (resulting in digestible PRs) —starting with trino.exceptions, trino.logging, and trino.transactions—by enforcing typed methods, calls, etc. which improves code clarity and correctness.

The hope is over time contributors can systematically go through module by module and ensure all methods are correctly typed and remove them from the ignore list.

hashhar commented 2 years ago

@mdesmet @hovaesco I'm fine merging this % https://github.com/trinodb/trino-python-client/pull/208#discussion_r949363282. Can you send a follow-up PR with updated instructions in the README.md?

mdesmet commented 1 year ago

@hashhar : Let's merge this. I will add another PR with updated instructions.

ebyhr commented 1 year ago

@john-bodley Could you rebase on upstream to resolve conflicts?

hashhar commented 1 year ago

@john-bodley I've rebased to resolve conflicts - no other changes. Once CI finishes and is green we'll merge this. Thanks for doing this work and sorry it took so long to get it done.