mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-19 06:18:06 +08:00
Replace Any with Incomplete in many places (#9558)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from .context import Context as _Context
|
||||
|
||||
class AsyncContext(_Context):
|
||||
def __init__(self, *args, loop: Any | None = ..., use_task_factory: bool = ..., **kwargs) -> None: ...
|
||||
def __init__(self, *args, loop: Incomplete | None = ..., use_task_factory: bool = ..., **kwargs) -> None: ...
|
||||
def clear_trace_entities(self) -> None: ...
|
||||
|
||||
class TaskLocalStorage:
|
||||
def __init__(self, loop: Any | None = ...) -> None: ...
|
||||
def __init__(self, loop: Incomplete | None = ...) -> None: ...
|
||||
def __setattr__(self, name: str, value) -> None: ...
|
||||
def __getattribute__(self, item: str): ...
|
||||
def clear(self) -> None: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from .models.segment import SegmentContextManager as SegmentContextManager
|
||||
from .models.subsegment import (
|
||||
@@ -19,7 +19,7 @@ class AsyncSubsegmentContextManager(SubsegmentContextManager):
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb): ...
|
||||
|
||||
class AsyncAWSXRayRecorder(AWSXRayRecorder):
|
||||
def capture_async(self, name: Any | None = ...): ...
|
||||
def in_segment_async(self, name: Any | None = ..., **segment_kwargs): ...
|
||||
def in_subsegment_async(self, name: Any | None = ..., **subsegment_kwargs): ...
|
||||
def capture_async(self, name: Incomplete | None = ...): ...
|
||||
def in_segment_async(self, name: Incomplete | None = ..., **segment_kwargs): ...
|
||||
def in_subsegment_async(self, name: Incomplete | None = ..., **subsegment_kwargs): ...
|
||||
async def record_subsegment_async(self, wrapped, instance, args, kwargs, name, namespace, meta_processor): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
|
||||
from aws_xray_sdk import global_sdk_config as global_sdk_config
|
||||
|
||||
@@ -18,7 +18,7 @@ def check_in_lambda(): ...
|
||||
class LambdaContext(Context):
|
||||
def __init__(self) -> None: ...
|
||||
def put_segment(self, segment) -> None: ...
|
||||
def end_segment(self, end_time: Any | None = ...) -> None: ...
|
||||
def end_segment(self, end_time: Incomplete | None = ...) -> None: ...
|
||||
def put_subsegment(self, subsegment) -> None: ...
|
||||
def get_trace_entity(self): ...
|
||||
@property
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from logging import Logger
|
||||
from traceback import StackSummary
|
||||
from typing import Any
|
||||
@@ -25,8 +26,8 @@ class Entity:
|
||||
cause: Any
|
||||
subsegments: Any
|
||||
end_time: Any
|
||||
def __init__(self, name, entity_id: Any | None = ...) -> None: ...
|
||||
def close(self, end_time: Any | None = ...) -> None: ...
|
||||
def __init__(self, name, entity_id: Incomplete | None = ...) -> None: ...
|
||||
def close(self, end_time: Incomplete | None = ...) -> None: ...
|
||||
def add_subsegment(self, subsegment) -> None: ...
|
||||
def remove_subsegment(self, subsegment) -> None: ...
|
||||
def put_http_meta(self, key, value) -> None: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from ..exceptions.exceptions import FacadeSegmentMutationException as FacadeSegmentMutationException
|
||||
@@ -8,7 +9,7 @@ MUTATION_UNSUPPORTED_MESSAGE: str
|
||||
class FacadeSegment(Segment):
|
||||
initializing: Any
|
||||
def __init__(self, name, entityid, traceid, sampled) -> None: ...
|
||||
def close(self, end_time: Any | None = ...) -> None: ...
|
||||
def close(self, end_time: Incomplete | None = ...) -> None: ...
|
||||
def put_http_meta(self, key, value) -> None: ...
|
||||
def put_annotation(self, key, value) -> None: ...
|
||||
def put_metadata(self, key, value, namespace: str = ...) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import time
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from ...core import AWSXRayRecorder
|
||||
@@ -17,7 +18,7 @@ class SubsegmentContextManager:
|
||||
subsegment_kwargs: dict[str, Any] | None
|
||||
recorder: AWSXRayRecorder
|
||||
subsegment: Subsegment
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: Any | None = ..., **subsegment_kwargs) -> None: ...
|
||||
def __init__(self, recorder: AWSXRayRecorder, name: Incomplete | None = ..., **subsegment_kwargs) -> None: ...
|
||||
def __call__(self, wrapped, instance, args: list[Any], kwargs: dict[str, Any]): ...
|
||||
def __enter__(self) -> Subsegment: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
log: Any
|
||||
@@ -7,6 +8,6 @@ IMDS_URL: str
|
||||
|
||||
def initialize() -> None: ...
|
||||
def get_token(): ...
|
||||
def get_metadata(token: Any | None = ...): ...
|
||||
def get_metadata(token: Incomplete | None = ...): ...
|
||||
def parse_metadata_json(json_str): ...
|
||||
def do_request(url, headers: Any | None = ..., method: str = ...): ...
|
||||
def do_request(url, headers: Incomplete | None = ..., method: str = ...): ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from ...exceptions.exceptions import InvalidSamplingManifestError as InvalidSamplingManifestError
|
||||
@@ -8,5 +9,5 @@ SUPPORTED_RULE_VERSION: Any
|
||||
|
||||
class LocalSampler:
|
||||
def __init__(self, rules=...) -> None: ...
|
||||
def should_trace(self, sampling_req: Any | None = ...): ...
|
||||
def should_trace(self, sampling_req: Incomplete | None = ...): ...
|
||||
def load_local_rules(self, rules) -> None: ...
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any
|
||||
|
||||
from .connector import ServiceConnector as ServiceConnector
|
||||
@@ -12,9 +13,9 @@ log: Any
|
||||
class DefaultSampler:
|
||||
def __init__(self) -> None: ...
|
||||
def start(self) -> None: ...
|
||||
def should_trace(self, sampling_req: Any | None = ...): ...
|
||||
def should_trace(self, sampling_req: Incomplete | None = ...): ...
|
||||
def load_local_rules(self, rules) -> None: ...
|
||||
def load_settings(self, daemon_config, context, origin: Any | None = ...) -> None: ...
|
||||
def load_settings(self, daemon_config, context, origin: Incomplete | None = ...) -> None: ...
|
||||
@property
|
||||
def xray_client(self): ...
|
||||
@xray_client.setter
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from ..utils.search_pattern import wildcard_match as wildcard_match
|
||||
from .reservoir import Reservoir as Reservoir
|
||||
@@ -10,11 +10,11 @@ class SamplingRule:
|
||||
priority,
|
||||
rate,
|
||||
reservoir_size,
|
||||
host: Any | None = ...,
|
||||
method: Any | None = ...,
|
||||
path: Any | None = ...,
|
||||
service: Any | None = ...,
|
||||
service_type: Any | None = ...,
|
||||
host: Incomplete | None = ...,
|
||||
method: Incomplete | None = ...,
|
||||
path: Incomplete | None = ...,
|
||||
service: Incomplete | None = ...,
|
||||
service_type: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
def match(self, sampling_req): ...
|
||||
def is_default(self): ...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
def get_stacktrace(limit: Any | None = ...): ...
|
||||
def get_stacktrace(limit: Incomplete | None = ...): ...
|
||||
|
||||
Reference in New Issue
Block a user