kensho-technologies / graphql-compiler

Turn complex GraphQL queries into optimized database queries.
Apache License 2.0
553 stars 50 forks source link

Add a few missing type hints. #978

Closed obi1kenobi closed 3 years ago

obi1kenobi commented 3 years ago

I found a missing -> None so I opened this PR to fix it.

Below the missing -> None, I ran into a bit of an issue. I wasn't sure what the type hint for SQL compilation should be, so I opened #977. Maybe @bojanserafimov or @chewselene can propose a better type hint than Any for that, and then we can make it explicitly written into the module.

codecov[bot] commented 3 years ago

Codecov Report

Merging #978 (349a086) into main (bf66f8b) will decrease coverage by 0.40%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #978      +/-   ##
==========================================
- Coverage   94.27%   93.87%   -0.41%     
==========================================
  Files         113      113              
  Lines        8893     8975      +82     
==========================================
+ Hits         8384     8425      +41     
- Misses        509      550      +41     
Impacted Files Coverage Δ
graphql_compiler/query_formatting/common.py 97.87% <100.00%> (ø)
...ql_compiler/schema_transformation/rename_schema.py 86.73% <0.00%> (-12.81%) :arrow_down:
graphql_compiler/schema_transformation/utils.py 93.04% <0.00%> (-2.17%) :arrow_down:
graphql_compiler/compiler/compiler_frontend.py 98.57% <0.00%> (+0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bf66f8b...349a086. Read the comment docs.

pmantica1 commented 3 years ago

I am going to approve and merge this PR. The output type can be made more precise in the PR that addresses https://github.com/kensho-technologies/graphql-compiler/pull/978.

pmantica1 commented 3 years ago

Linting is failing.