-
Notifications
You must be signed in to change notification settings - Fork 16
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
Type Annotation #62
Comments
Hi @iwoloschin , @property
def Location(self):
# type: () -> str
"""
Returns
-------
- str: The current format is {chassisIp}/{frontPanelPort}.{fanoutPort} or {chassisIp};{cardId};{portId} for legacy systems.
"""
return self._get_attribute(self._SDM_ATT_MAP['Location'])
@Location.setter
def Location(self, value):
# type: (str) -> None
self._set_attribute(self._SDM_ATT_MAP['Location'], value) Please let us know if this answers your question. |
It looks like a lot of things, particularly from ixnetwork_restpy import SessionAssistant
session = SessionAssistant()
session.Ixnetwork.Traffic According to Pylance the Separately, it may also be helpful to organize common types in an easily accessible location for applications to import to use themselves, for example if I wanted to pass from ixnetwork_restpy.testplatform.sessions.ixnetwork.traffic.traffic import Traffic
def do_traffic(traffic: Traffic) -> None: It gets worse with TrafficItem! from ixnetwork_restpy.testplatform.sessions.ixnetwork.traffic.trafficitem.trafficitem import TrafficItem
def do_traffic_item(traffic_item: TrafficItem) -> None: Python type annotations are obviously never necessary, but they can make a huge difference in how fast & comfortable it is to use a complex library such as this one. |
Is there any work being done to support type annotation for this library?
The text was updated successfully, but these errors were encountered: