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

Fix add more type hints #981

Closed
wants to merge 5 commits into from
Closed

Fix add more type hints #981

wants to merge 5 commits into from

Conversation

alm0ra
Copy link
Contributor

@alm0ra alm0ra commented Feb 13, 2024

Changes

Add more type hints to integrate with Mypy
reference #980

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder

return [
(topic_name, (new_part.total_count, new_part.new_assignments))
for topic_name, new_part in topic_partitions.items()
]

async def create_partitions(
self,
topic_partitions: Dict[str, TopicPartition],
topic_partitions: Dict[str, NewPartitions],
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to fix type name in docstring too

Copy link
Collaborator

@ods ods Feb 17, 2024

Choose a reason for hiding this comment

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

Hmm… I see it's already NewPartitions in master, it was fixed by your other MR #978

num_partitions: int,
replication_factor: int,
replica_assignments: Optional[Dict[int, List[int]]] = None,
topic_configs: Optional[Dict[str, str]] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please run make format to fix formatting

@ods
Copy link
Collaborator

ods commented Feb 17, 2024

PR #978 is already merged into master, so it looks like a duplicate. Therefore closing this one.

@ods ods closed this Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants