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

Overload hash generation functions to make return types more specific #2047

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 2, 2024

  1. Overload hash generation functions to make return types more specific

    Before this change, the return type for these functions was always
    `bytes| str`. However, the type can be narrowed based on the value
    passed to `raw_output`.
    
    This change adds overload annotations for the two allowable values to
    allow type checkers to narrow the type and correctly infer the exact
    return type.
    
    Resolves joke2k#2046
    samueljsb committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    a3ad211 View commit details
    Browse the repository at this point in the history