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

Add NoStringTypeAnnotationRule #140

Merged
merged 13 commits into from
Sep 26, 2020
Merged

Conversation

liangming168
Copy link
Contributor

Summary

Enforce the use of type identifier instead of using string type hints.

Test Plan

unit test: tox -e py37

Screen Shot 2020-09-25 at 9 20 49 PM

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 26, 2020
@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2020

Codecov Report

Merging #140 into master will increase coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #140      +/-   ##
==========================================
+ Coverage   84.06%   84.24%   +0.18%     
==========================================
  Files          80       81       +1     
  Lines        3308     3346      +38     
==========================================
+ Hits         2781     2819      +38     
  Misses        527      527              
Impacted Files Coverage Δ
fixit/rules/no_string_type_annotation.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 efade0a...c4d6007. Read the comment docs.

@liangming168
Copy link
Contributor Author

future feature annotations is not defined before python 3.7, any idea to handle this case?

Copy link
Contributor

@jimmylai jimmylai left a comment

Choose a reason for hiding this comment

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

Please don't commit .DS_Store files. They are unrelated.

fixit/rules/no_string_type_annotation.py Outdated Show resolved Hide resolved
fixit/rules/no_string_type_annotation.py Outdated Show resolved Hide resolved
fixit/rules/no_string_type_annotation.py Outdated Show resolved Hide resolved
@jimmylai
Copy link
Contributor

Thanks for contributing! Other than the comments, LGTM.

@liangming168
Copy link
Contributor Author

Please don't commit .DS_Store files. They are unrelated.

.DS_Store files are all deleted.

Copy link
Contributor

@jimmylai jimmylai left a comment

Choose a reason for hiding this comment

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

LGTM

fixit/rules/no_string_type_annotation.py Outdated Show resolved Hide resolved
@jimmylai jimmylai merged commit 1fb0315 into Instagram:master Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants