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

[typing] enable Pyre strict mode by default #313

Merged
merged 1 commit into from
Jun 13, 2020

Conversation

jimmylai
Copy link
Contributor

@jimmylai jimmylai commented Jun 12, 2020

Summary

Enable Pyre strict mode by default.

  1. Add pyre-fixme and pyre-unsafe to existing type errors and modules.
  2. Remove pyre-strict by codemod python3 -m libcst.tool codemod remove_pyre_directive.RemovePyreStrictCommand libcst
  3. Update codegen to not adding pyre-strct in generated files.
  4. Run test_pyre_integration.py to generate Pyre test fixtures. (The source code has a pyre-strict removal change.)

Test Plan

CI builds.

@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 Jun 12, 2020
@jimmylai jimmylai force-pushed the pyre_strict branch 2 times, most recently from 180640b to 007d6cb Compare June 12, 2020 23:46
@carljm
Copy link
Contributor

carljm commented Jun 12, 2020

Seems CI is not happy.

@jimmylai jimmylai force-pushed the pyre_strict branch 2 times, most recently from d155516 to b8ea0e1 Compare June 13, 2020 00:11
@codecov-commenter
Copy link

Codecov Report

Merging #313 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #313      +/-   ##
==========================================
- Coverage   93.96%   93.96%   -0.01%     
==========================================
  Files         223      223              
  Lines       21441    21438       -3     
==========================================
- Hits        20148    20145       -3     
  Misses       1293     1293              
Impacted Files Coverage Δ
libcst/__init__.py 100.00% <ø> (ø)
libcst/_add_slots.py 85.71% <ø> (ø)
libcst/_batched_visitor.py 94.54% <ø> (ø)
libcst/_exceptions.py 98.70% <ø> (ø)
libcst/_maybe_sentinel.py 100.00% <ø> (ø)
libcst/_metadata_dependent.py 92.30% <ø> (ø)
libcst/_nodes/__init__.py 100.00% <ø> (ø)
libcst/_nodes/base.py 95.29% <ø> (ø)
libcst/_nodes/deep_equals.py 96.29% <ø> (ø)
libcst/_nodes/expression.py 96.62% <ø> (ø)
... and 202 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 cc7bb9d...9891d3a. Read the comment docs.

Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Lgtm!

@jimmylai jimmylai merged commit c023fa7 into Instagram:master Jun 13, 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