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