Rule codename: do-not-import-asyncio Rule number: 666
You should not, because trio
import "@azure-tools/typespec-azure-core"; | |
import "@typespec/http"; | |
import "@typespec/rest"; | |
import "@typespec/versioning"; | |
using TypeSpec.Rest; | |
using TypeSpec.Http; | |
using TypeSpec.Versioning; | |
using Azure.Core; | |
using Azure.Core.Traits; |
import typing | |
import httpx | |
import requests | |
from httpx import Auth, Request, Response | |
from azure.core.credentials import TokenCredential | |
from azure.core.pipeline.policies import BearerTokenCredentialPolicy | |
from azure.core.pipeline import PipelineRequest, PipelineContext | |
from azure.core.pipeline.transport import HttpRequest |
import "@typespec/http"; | |
import "@typespec/rest"; | |
import "@typespec/versioning"; | |
import "@azure-tools/typespec-azure-core"; | |
using TypeSpec.Http; | |
using TypeSpec.Rest; | |
using TypeSpec.Versioning; | |
using Azure.Core; | |
using Azure.Core.Traits; |
from subprocess import check_output, CalledProcessError, DEVNULL | |
from pathlib import Path | |
from multiprocessing import Pool | |
from ci_tools.environment_exclusions import is_check_enabled | |
BASE_FOLDER = "/home/lmazuel/git/azure-sdk-for-python/" | |
TOX_INI = BASE_FOLDER+"eng/tox/tox.ini" | |
SDK_FOLDER = BASE_FOLDER+"sdk" | |
def run_next_pylint(folder: str): |
Given a visibility on a property on an attribute on a model, should this property be serialized to be sent to the server? This explains the algorithm to let SDK decide what to send or not, depending of create, update, etc.
It doesn't adress on purpose the question of SDK design (one model, more model, kwarg only, etc.), this is a page about serialization on the wire
Status code: 201 | |
Headers: | |
'Content-Length': '594', | |
'Content-Type': 'application/json' | |
'Location': 'https://lmazuelanom.cognitiveservices.azure.com:443/anomalydetector/v1.1/multivariate/models/0c46cef0-c76e-11ed-83a5-8247640b151e' | |
'x-envoy-upstream-service-time': '247' | |
'apim-request-id': 'b5437cd9-f2f1-401b-b431-0993c096350c' | |
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload' | |
'x-content-type-options': 'nosniff' | |
'x-ms-region': 'East US' |
from typing import TypeVar, Optional, Generic, Protocol | |
class Additive(Protocol): | |
def __add__(self: 'MyReturnType', other: 'MyReturnType') -> 'MyReturnType': ... | |
MyReturnType = TypeVar("MyReturnType", bound=Additive) | |
class Foo(Generic[MyReturnType]): | |
def __init__(self, input: MyReturnType) -> None: |
class MVADPolling(LongRunningOperation): | |
"""Implements MVAD train polling.""" | |
def __init__(self): | |
self._model_id = None | |
def can_poll(self, pipeline_response: "PipelineResponseType") -> bool: | |
# This method is used for algorithm chaining, in MVAD we don't need | |
# it since this is the only one we will register | |
return True |
# Just having fun, don't take this to seriously :p | |
import sys | |
import importlib | |
def new_module(mod_name): | |
spec = importlib.machinery.ModuleSpec(mod_name,None) | |
return importlib.util.module_from_spec(spec) |