Skip to content

Commit

Permalink
Address pylint is incompatible with py3.9 issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
zihzhan-msft committed Sep 15, 2021
1 parent a31ee09 commit 09f18ae
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# license information.
# --------------------------------------------------------------------------

# pylint: disable=unsubscriptable-object
# disabled unsubscriptable-object because of pylint bug referenced here:
# https://github.com/PyCQA/pylint/issues/3882

from typing import TYPE_CHECKING, Any, Optional # pylint: disable=unused-import

from azure.core.tracing.decorator_async import distributed_trace_async
Expand All @@ -21,11 +25,11 @@
from .._generated.aio.operations import CallConnectionsOperations
from .._models import PlayAudioOptions

class CallConnection(object):
class CallConnection:
def __init__(
self,
call_connection_id: str,
call_connection_client: CallConnectionsOperations
call_connection_client: 'CallConnectionsOperations'
) -> None:

self.call_connection_id = call_connection_id
Expand Down Expand Up @@ -63,7 +67,7 @@ async def cancel_all_media_operations(
async def play_audio(
self,
audio_file_uri: str,
play_audio_options: PlayAudioOptions,
play_audio_options: 'PlayAudioOptions',
**kwargs: Any
) -> PlayAudioResult:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# license information.
# --------------------------------------------------------------------------

# pylint: disable=unsubscriptable-object
# disabled unsubscriptable-object because of pylint bug referenced here:
# https://github.com/PyCQA/pylint/issues/3882

from typing import TYPE_CHECKING, Any, List # pylint: disable=unused-import

from azure.core.tracing.decorator_async import distributed_trace_async
Expand All @@ -23,7 +27,7 @@
from azure.core.credentials_async import AsyncTokenCredential
from .._models import CreateCallOptions, JoinCallOptions

class CallingServerClient(object):
class CallingServerClient:
"""A client to interact with the AzureCommunicationService Calling Server.
This client provides calling operations.
Expand All @@ -42,7 +46,7 @@ class CallingServerClient(object):
def __init__(
self,
endpoint: str,
credential: AsyncTokenCredential,
credential: 'AsyncTokenCredential',
**kwargs: Any
) -> None:
try:
Expand Down Expand Up @@ -71,7 +75,7 @@ def from_connection_string(
cls,
conn_str: str,
**kwargs: Any
) -> CallingServerClient:
) -> 'CallingServerClient':
"""Create CallingServerClient from a Connection String.
:param str conn_str:
Expand Down Expand Up @@ -129,7 +133,7 @@ async def create_call_connection(
self,
source: CommunicationIdentifier,
targets: List[CommunicationIdentifier],
options: CreateCallOptions,
options: 'CreateCallOptions',
**kwargs: Any
) -> CallConnection:
"""Create an outgoing call from source to target identities.
Expand Down Expand Up @@ -176,7 +180,7 @@ async def join_call(
self,
server_call_id: str,
source: CommunicationIdentifier,
call_options: JoinCallOptions,
call_options: 'JoinCallOptions',
**kwargs: Any
) -> CallConnection:
"""Join the call using server call id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# license information.
# --------------------------------------------------------------------------

# pylint: disable=unsubscriptable-object
# disabled unsubscriptable-object because of pylint bug referenced here:
# https://github.com/PyCQA/pylint/issues/3882

from typing import TYPE_CHECKING, Any, Optional # pylint: disable=unused-import

from azure.core.tracing.decorator_async import distributed_trace_async
Expand All @@ -20,12 +24,12 @@
from .._models import PlayAudioOptions
from .._shared.models import CommunicationIdentifier

class ServerCall(object):
class ServerCall:

def __init__(
self,
server_call_id: str,
server_call_client: ServerCallsOperations
server_call_client: 'ServerCallsOperations'
) -> None:
self.server_call_id = server_call_id
self._server_call_client = server_call_client
Expand All @@ -34,7 +38,7 @@ def __init__(
async def play_audio(
self,
audio_file_uri: str,
play_audio_options: PlayAudioOptions,
play_audio_options: 'PlayAudioOptions',
**kwargs: Any
) -> PlayAudioResult:

Expand All @@ -55,7 +59,7 @@ async def play_audio(
@distributed_trace_async()
async def add_participant(
self,
participant: CommunicationIdentifier,
participant: 'CommunicationIdentifier',
callback_uri: str,
alternate_caller_id: Optional[str],
operation_context: Optional[str],
Expand Down

0 comments on commit 09f18ae

Please sign in to comment.