Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Copilot Setup Steps

on: workflow_dispatch

env:
COPILOT_AGENT_FIREWALL_ALLOW_LIST: frdvsblobprodcus327.vsblob.vsassets.io

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'

- name: Ensure virtualenv installed
run: python -m pip install virtualenv

- name: Create and activate virtual environment
run: |
python -m virtualenv .venv
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH

- name: Install Dependencies
run: |
python -m pip install -r eng/ci_tools.txt

- name: Set persistent wheel cache path
run: |
echo "VIRTUALENV_OVERRIDE_APP_DATA=${{ github.workspace }}/.venv_app_data" >> $GITHUB_ENV

- name: Cache virtualenv wheel data
uses: actions/cache@v4
with:
path: .venv_app_data
key: venv-app-data-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
venv-app-data-${{ runner.os }}-

- name: Populate the seed dir
run: |
virtualenv --download \
--pip=24.0 \
--setuptools=75.3.2 \
--wheel=0.45.1 \
${{ github.workspace }}/.venv_app_data
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from azure.core.paging import ItemPaged


class ChatClient(object): # pylint: disable=client-accepts-api-version-keyword
class ChatClient(object):
"""A client to interact with the AzureCommunicationService Chat gateway.

This client provides operations to create chat thread, delete chat thread,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from azure.core.paging import ItemPaged


class ChatThreadClient(object): # pylint: disable=client-accepts-api-version-keyword
class ChatThreadClient(object):
"""A client to interact with the AzureCommunicationService Chat gateway.
Instances of this class is normally retrieved by ChatClient.get_chat_thread_client()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .operations import ChatOperations, ChatThreadOperations


class AzureCommunicationChatService: # pylint: disable=client-accepts-api-version-keyword
class AzureCommunicationChatService:
"""Azure Communication Chat Service.

:ivar chat_thread: ChatThreadOperations operations
Expand All @@ -33,7 +33,7 @@ class AzureCommunicationChatService: # pylint: disable=client-accepts-api-versi
:paramtype api_version: str
"""

def __init__( # pylint: disable=missing-client-constructor-parameter-credential
def __init__(
self, endpoint: str, **kwargs: Any
) -> None:
_endpoint = "{endpoint}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
VERSION = "unknown"


class AzureCommunicationChatServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class AzureCommunicationChatServiceConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AzureCommunicationChatService.

Note that all parameters used to create this instance are saved as instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .operations import ChatOperations, ChatThreadOperations


class AzureCommunicationChatService: # pylint: disable=client-accepts-api-version-keyword
class AzureCommunicationChatService:
"""Azure Communication Chat Service.

:ivar chat_thread: ChatThreadOperations operations
Expand All @@ -33,7 +33,7 @@ class AzureCommunicationChatService: # pylint: disable=client-accepts-api-versi
:paramtype api_version: str
"""

def __init__( # pylint: disable=missing-client-constructor-parameter-credential
def __init__(
self, endpoint: str, **kwargs: Any
) -> None:
_endpoint = "{endpoint}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
VERSION = "unknown"


class AzureCommunicationChatServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class AzureCommunicationChatServiceConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AzureCommunicationChatService.

Note that all parameters used to create this instance are saved as instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
import urllib.parse
import uuid

from azure.core.exceptions import (
ClientAuthenticationError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def build_add_chat_participants_request(chat_thread_id: str, **kwargs: Any) -> H
return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)


def build_update_chat_thread_properties_request( # pylint: disable=name-too-long
def build_update_chat_thread_properties_request(
chat_thread_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _sign_request(self, request):
# There's a similar scenario in azure-storage-blob and azure-appconfiguration, the check logic is from there.
try:
from yarl import URL
from azure.core.pipeline.transport import ( # pylint:disable=non-abstract-transport-import
from azure.core.pipeline.transport import (
AioHttpTransport,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import json
from typing import Any, List, Optional
# pylint: disable=non-abstract-transport-import
# pylint: disable=no-name-in-module
from azure.core.pipeline.transport import RequestsTransport
from azure.core.credentials import AccessToken
Expand All @@ -28,8 +27,6 @@ class TokenExchangeClient:
:keyword transport: Optional transport to use for the pipeline.
"""

# pylint: disable=C4748
# pylint: disable=client-method-missing-type-annotations
def __init__(
self,
resource_endpoint: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import json
from typing import Any, Optional, List
# pylint: disable=non-abstract-transport-import
# pylint: disable=no-name-in-module
from azure.core.pipeline.transport import AioHttpTransport
from azure.core.credentials import AccessToken
Expand All @@ -28,8 +27,6 @@ class TokenExchangeClient:
:keyword transport: Optional transport to use for the pipeline.
"""

# pylint: disable=C4748
# pylint: disable=client-method-missing-type-annotations
def __init__(
self,
resource_endpoint: str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: disable=C4763

import asyncio
import sys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------
# pylint: disable=C4763
from asyncio import sleep, ensure_future

class AsyncTimer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from .._version import SDK_MONIKER


class ChatClient(object): # pylint: disable=client-accepts-api-version-keyword
class ChatClient(object):
"""A client to interact with the AzureCommunicationService Chat gateway.

This client provides operations to create chat thread, delete chat thread,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from .._version import SDK_MONIKER


class ChatThreadClient(object): # pylint: disable=client-accepts-api-version-keyword
class ChatThreadClient(object):
"""A client to interact with the AzureCommunicationService Chat gateway.
Instances of this class is normally retrieved by ChatClient.get_chat_thread_client()

Expand Down