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

Improve type precision stats #7261

merged 15 commits into from Jul 25, 2019


Copy link

commented Jul 24, 2019

This makes various improvements to type precision reporting:

  • Consider literals precise in type checked code.
  • Consider class headers precise (I'll improve this later).
  • Consider pass/break/continue precise in type checked code.
  • Consider call imprecise if target function has imprecise argument
    types, and the caller provides one of these arguments.

Some of these are still incomplete (for example, overloaded functions
aren't supported). I'll deal with these issues in follow-up PRs.

@JukkaL JukkaL requested a review from msullivan Jul 24, 2019
Copy link

left a comment

This looks good.

pass # TODO: Handle overloaded functions, etc.

def record_callable_target_precision(self, o: CallExpr, callee: CallableType) -> None:

This comment has been minimized.

Copy link

msullivan Jul 24, 2019


Document the rationale for how we count this, since it is arguable maybe?

JukkaL added 2 commits Jul 25, 2019
@JukkaL JukkaL merged commit a7538dd into master Jul 25, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
@ilevkivskyi ilevkivskyi deleted the precision-stats-2 branch Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.