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

Add type annotations #207

Merged
merged 9 commits into from
Apr 23, 2023
Merged

Add type annotations #207

merged 9 commits into from
Apr 23, 2023

Commits on Apr 18, 2023

  1. Configuration menu
    Copy the full SHA
    2f06f4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c3e9408 View commit details
    Browse the repository at this point in the history
  3. Add type annotations to scuba.dockerutil

    This also necessitated a few refactors:
    - Replace __wrap_docker_exec() with straightforward implementations
    - Move error message into DockerExecuteError.__init__
    - Refactor out common behavior into _get_image_config()
    JonathonReinhart committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    97c36f8 View commit details
    Browse the repository at this point in the history
  4. Add type annotations to scuba.version

    Also, change git_describe() to return a GitDescribe dataclass result.
    JonathonReinhart committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    4605c20 View commit details
    Browse the repository at this point in the history
  5. Add type annotations to scuba.config

    Other notable changes:
    - ScubaAlias, ScubaVolume are now frozen dataclass classes
    - Added Loader._rooted_loader to satisfy requirement that yaml.load's
      second parameter must be a Type
    - Added _get_str()
    - Added 'default' parameter to _get_typed_val()
    JonathonReinhart committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    bd487fb View commit details
    Browse the repository at this point in the history
  6. Add type annotations to scuba.scuba

    Notable changes:
    - Made ScubaContext a dataclass with non-optional members. This required
      significant changes in ScubaContext.process_command(), since all
      values must be known when the object is constructed, and not default
      to None to be updated later in the function.
    - ScubaContext.process_command() image and shell arguments were renamed
      to add _override to clarify their behavior.
    
    Notable gaps:
    - open_scubadir_file() returns Any because I couldn't figure out how to
      correctly annotate a TextIO object with an additional container_path
      attribute.
    JonathonReinhart committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    d1daf0a View commit details
    Browse the repository at this point in the history
  7. Add type annotations to scuba.__main__

    Move argcomplete stub to its own module.
    JonathonReinhart committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    f016852 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d8056ad View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2023

  1. Update changelog

    JonathonReinhart committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    948e7e6 View commit details
    Browse the repository at this point in the history