Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Add Literal to typing import shim, change to mypy-friendly approach. #926

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

obi1kenobi
Copy link
Contributor

Without the sys.version_info check, this used to require a type: ignore due to the following problem:
https://twitter.com/PredragGruevski/status/1308085206285529089?s=20

Mypy tracking issue for the import error approach is here: python/mypy#1393

For our needs, sys.version_info is an acceptable solution for Python import shims.

@obi1kenobi obi1kenobi added the maintainer quality-of-life Features that ease development, but are not necessarily visible to package users. label Sep 22, 2020
@codecov
Copy link

codecov bot commented Sep 22, 2020

Codecov Report

Merging #926 into main will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #926   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         109      109           
  Lines        8734     8734           
=======================================
  Hits         8301     8301           
  Misses        433      433           
Impacted Files Coverage Δ
graphql_compiler/typedefs.py 100.00% <100.00%> (ø)

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 3ef884c...51be04c. Read the comment docs.

@LWprogramming LWprogramming merged commit 2b1f200 into main Sep 22, 2020
@LWprogramming LWprogramming deleted the rework_conditional_import branch September 22, 2020 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
maintainer quality-of-life Features that ease development, but are not necessarily visible to package users.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants