Skip to content

mgr/orch: Add some more type annotations#36285

Merged
sebastian-philipp merged 1 commit intoceph:masterfrom
sebastian-philipp:orch-completion-generic
Jul 28, 2020
Merged

mgr/orch: Add some more type annotations#36285
sebastian-philipp merged 1 commit intoceph:masterfrom
sebastian-philipp:orch-completion-generic

Conversation

@sebastian-philipp
Copy link
Contributor

Made orch.Completion a generic type

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Copy link
Contributor

@mgfritch mgfritch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for more type annotations! just a few minor nits ..

else:
# must be idempotent: still a success.
return [f'Failed to remove service. <{service_name}> was not found.']
return f'Failed to remove service. <{service_name}> was not found.'
Copy link
Contributor

@mgfritch mgfritch Jul 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return f'Failed to remove service. <{service_name}> was not found.'
return f'Failed to remove service. {service_name} was not found.'

output looks weird with <> chars? remove these?

Comment on lines -792 to +793
# type: (HostSpec) -> Completion
# type: (HostSpec) -> Completion[str]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert these to py3 style while we are here?

@sebastian-philipp
Copy link
Contributor Author

Made `orch.Completion` a generic type

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
@sebastian-philipp sebastian-philipp force-pushed the orch-completion-generic branch from 85d2c5c to 2310d7f Compare July 28, 2020 10:32
@sebastian-philipp
Copy link
Contributor Author

This PR conflicted with apply_drivegroups() and thus the rebase only affects make check. IMO should be ok to merge.

@sebastian-philipp
Copy link
Contributor Author

jenkins test make check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants