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

Replace FileLanguage class with a Language enum #39

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Jan 29, 2024

  1. Replace FileLanguage class with a Language enum

    - Avoids referencing languages by name (as strings).
    - Enables multiple constructors (from_path and from_ext).
    - Enables a dedicated sentinel value (UNKNOWN) instead of None.
    
    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    9549265 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Add UserWarning for functions taking language=None

    We can convert None into Language.UNKNOWN automatically, so there is no need to
    break downstream users of these functions.
    
    Signed-off-by: John Pennycook <john.pennycook@intel.com>
    Pennycook committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    baf118f View commit details
    Browse the repository at this point in the history