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

[EventHub] typing for class variables #26209

Closed
JJHWAN opened this issue Sep 14, 2022 · 3 comments
Closed

[EventHub] typing for class variables #26209

JJHWAN opened this issue Sep 14, 2022 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs Messaging Messaging crew question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@JJHWAN
Copy link
Contributor

JJHWAN commented Sep 14, 2022

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Some class variables in eventhub has older version of typing.

Such as
`class EventProcessorMixin(object):

_eventhub_client = (
    None
)  # type: Optional[Union[EventHubConsumerClient, EventHubConsumerClientAsync]]
_consumer_group = ""  # type: str
_owner_level = None  # type: Optional[int]
_prefetch = None  # type: Optional[int]
_track_last_enqueued_event_properties = False  # type: bool
_initial_event_position_inclusive = {}  # type: Union[bool, Dict[str, bool]]
_initial_event_position = (
    {}
)  # type: Union[int, str, datetime, Dict[str, Union[int, str, datetime]]]

`
From this typing link

It seems to be better to change typing to
Example :
from
_consumer_group = "" # type: str
to
_consumer_group: str = ""

I think it may be applied to other directories too

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 14, 2022
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 14, 2022
@azure-sdk azure-sdk added Client This issue points to a problem in the data-plane of the library. Event Hubs needs-team-triage Workflow: This issue needs the team to triage. labels Sep 14, 2022
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 14, 2022
@kristapratico kristapratico removed the needs-team-triage Workflow: This issue needs the team to triage. label Sep 14, 2022
@kristapratico
Copy link
Member

Hi @JJHWAN thanks for your feedback, our team will take a look.

@swathipil
Copy link
Member

@JJHWAN - Thanks for submitting a PR to address this! #26208 (review)

Just reviewed and can take another look after my comments have been addressed.

@lmazuel lmazuel added the Messaging Messaging crew label Nov 16, 2022
@swathipil
Copy link
Member

pr merged

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Event Hubs Messaging Messaging crew question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

7 participants