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

Some type annotation & check_untyped_defs fixes #6311

Merged
merged 5 commits into from Jan 19, 2020

Commits on Jan 19, 2020

  1. Cleanup unhelpful alias _AST_FLAG

    Also replace one direct call to `compile` with this flag with the
    equivalent wrapper `ast.parse`. This function can have a more precise
    type.
    bluetech committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    3e6f0f3 View commit details
    Browse the repository at this point in the history
  2. Add a few missing type annotations in _pytest._code

    These are more "dirty" than the previous batch (that's why they were
    left out). The trouble is that `compile` can return either a code object
    or an AST depending on a flag, so we need to add an overload to make the
    common case Union free. But it's still worthwhile.
    bluetech committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    0c247be View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0b60315 View commit details
    Browse the repository at this point in the history
  4. Fix type of pytest.warns, and fix check_untyped_defs in test_recwarn

    The expected_warning is optional.
    bluetech committed Jan 19, 2020
    Configuration menu
    Copy the full SHA
    3d2680b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3392be3 View commit details
    Browse the repository at this point in the history