trino-python-client icon indicating copy to clipboard operation
trino-python-client copied to clipboard

[mypy] Enforce Mypy checks for a subset of modules

Open john-bodley opened this issue 3 years ago • 2 comments

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.

john-bodley avatar Jul 27 '22 08:07 john-bodley

@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?

hashhar avatar Aug 18 '22 16:08 hashhar

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

mdesmet avatar Oct 14 '22 08:10 mdesmet

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

ebyhr avatar Nov 02 '22 00:11 ebyhr

@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.

hashhar avatar Nov 22 '22 10:11 hashhar