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

DM-24807: Add type annotations to datastore #280

Merged
merged 5 commits into from
May 17, 2020
Merged

DM-24807: Add type annotations to datastore #280

merged 5 commits into from
May 17, 2020

Commits on May 16, 2020

  1. Add allRefs method to DatasetRef and FakeDatasetRef

    This simplifies the case where we only want the
    refs for a single ref. Also makes type annotations
    easier.
    timj committed May 16, 2020
    Configuration menu
    Copy the full SHA
    7d1d972 View commit details
    Browse the repository at this point in the history
  2. Rewrite StoredFileInfo with __init__ and frozen

    Rather than using __post_init__ (which is very hard
    to use type annotations with) instead force the
    dataclass to be frozen but also replace with
    our own __init__
    timj committed May 16, 2020
    Configuration menu
    Copy the full SHA
    1fad749 View commit details
    Browse the repository at this point in the history
  3. Replace Datastore.names with a read-only tuple

    A mutable list is not what we wanted for something
    that should not be changed by the caller.
    timj committed May 16, 2020
    Configuration menu
    Copy the full SHA
    329ac4e View commit details
    Browse the repository at this point in the history
  4. Enable type annotations for datastore

    Also added annotations for related classes called
    by datastores.
    
    Mypy has been enabled for some core classes.
    timj committed May 16, 2020
    Configuration menu
    Copy the full SHA
    b46c3a9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    321fa34 View commit details
    Browse the repository at this point in the history