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 mypy setup + a few minor type fixes and removals #5615

Merged
merged 7 commits into from
Jul 19, 2019

Commits on Jul 16, 2019

  1. Run mypy on src/ and testing/ together

    This makes testing/ actually pick up the pytest imports -- otherwise
    they are opaque and we don't actually test the types.
    
    A single run is also a bit faster and simpler. The original reason why
    we split it is no longer relevant (we fixed the problems).
    bluetech committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    fd8f92d View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2019

  1. Configuration menu
    Copy the full SHA
    104f8fc View commit details
    Browse the repository at this point in the history
  2. Allow tuple of exceptions in ExceptionInfo.errisinstance

    isinstance() accepts it and some code does pass a tuple.
    
    Fixup for commit 55a570e.
    bluetech committed Jul 17, 2019
    Configuration menu
    Copy the full SHA
    8d413c1 View commit details
    Browse the repository at this point in the history
  3. Allow bytes for OutcomeException(msg=...)

    It's __repr__ explicitly handles it so allow it.
    bluetech committed Jul 17, 2019
    Configuration menu
    Copy the full SHA
    65aee1e View commit details
    Browse the repository at this point in the history
  4. Remove a no-longer-needed check if enum is available

    Not needed since 4d49ba6.
    bluetech committed Jul 17, 2019
    Configuration menu
    Copy the full SHA
    7d1c697 View commit details
    Browse the repository at this point in the history
  5. Remove unnecessary checks from SetupState

    Since 4622c28, _finalizers cannot
    contain Nones or tuples, so these checks are not longer needed.
    bluetech committed Jul 17, 2019
    Configuration menu
    Copy the full SHA
    0b532fd View commit details
    Browse the repository at this point in the history
  6. Don't accept bytes message in pytest.{fail,xfail,skip}

    It seems to have been added in pytest-dev#1439 to fix pytest-dev#1178.
    
    This was only relevant for Python 2 where it was tempting to use str (==
    bytes) literals instead of unicode literals. In Python 3, it is unlikely
    that anyone passes bytes to these functions.
    bluetech committed Jul 17, 2019
    Configuration menu
    Copy the full SHA
    675e950 View commit details
    Browse the repository at this point in the history