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 hints in ModelNotFoundException #41068

Closed
wants to merge 1 commit into from
Closed

Improve type hints in ModelNotFoundException #41068

wants to merge 1 commit into from

Commits on Feb 17, 2022

  1. Improve type hints in ModelNotFoundException

    I am using this class in my unit tests to build up an exception I expect
    to be thrown in the code under test. My model is using string keys, so
    both my IDE and static analysis tooling complain about passing its ID.
    
    Additional work on this could be done by:
    - introducing generic types for both the model and its ID
    - using strong type hints
    I kept it light and simple for now and only changed the type hints.
    spawnia committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    df598ff View commit details
    Browse the repository at this point in the history