Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type-hint rename_schema.py #847

Merged
merged 23 commits into from
Jun 22, 2020

Conversation

LWprogramming
Copy link
Collaborator

Step 1 as outlined in PR 834

Copy link
Contributor

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor typing nit, otherwise looks great!

@codecov
Copy link

codecov bot commented Jun 22, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@c38b661). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #847   +/-   ##
=========================================
  Coverage          ?   94.76%           
=========================================
  Files             ?      108           
  Lines             ?     8398           
  Branches          ?        0           
=========================================
  Hits              ?     7958           
  Misses            ?      440           
  Partials          ?        0           
Impacted Files Coverage Δ
...ql_compiler/schema_transformation/rename_schema.py 100.00% <100.00%> (ø)
graphql_compiler/compiler/helpers.py 93.63% <0.00%> (ø)
..._compiler/schema_generation/sqlalchemy/__init__.py 66.66% <0.00%> (ø)
...r/compiler/workarounds/orientdb_eval_scheduling.py 61.90% <0.00%> (ø)
...ql_compiler/compiler/ir_lowering_match/__init__.py 100.00% <0.00%> (ø)
graphql_compiler/compiler/context_helpers.py 100.00% <0.00%> (ø)
graphql_compiler/macros/macro_edge/descriptor.py 100.00% <0.00%> (ø)
...raphql_compiler/query_formatting/sql_formatting.py 100.00% <0.00%> (ø)
graphql_compiler/api/sql/mssql.py 0.00% <0.00%> (ø)
graphql_compiler/macros/macro_expansion.py 93.44% <0.00%> (ø)
... and 99 more

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 c38b661...eece08a. Read the comment docs.

graphql_compiler/schema_transformation/rename_schema.py Outdated Show resolved Hide resolved
@@ -186,36 +230,35 @@ class RenameSchemaTypesVisitor(Visitor):
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we specifically need this to be a class attribute here? If not, can we move it to module-level and make it sit right adjacent to the Union definition that it duplicates?

Copy link
Collaborator Author

@LWprogramming LWprogramming Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's specifically used for RenameSchemaTypesVisitor, as it explicitly leaves out renaming the schema query type (i.e. SchemaQuery). RenameQueryTypeFieldsVisitor is the visitor that modifies the schema query type. Moving this class attribute to module-level could be confusing considering that we do actually modify the schema query type, just not in this particular class.

graphql_compiler/schema_transformation/rename_schema.py Outdated Show resolved Hide resolved
@obi1kenobi obi1kenobi merged commit 3cbc9d2 into master Jun 22, 2020
@obi1kenobi obi1kenobi deleted the schema_rename_suppress_types_type_hint_prework branch June 22, 2020 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants