Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 23, 2023
1 parent b80f231 commit e930248
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion aiozipkin/aiohttp_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ async def on_request_exception(
context: SimpleNamespace,
params: TraceRequestExceptionParams,
) -> None:

span_context = self._get_span_context(context)
if span_context is None:
return
Expand Down
1 change: 0 additions & 1 deletion aiozipkin/context_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class _Base(Generic[T], AsyncContextManager, AbcAwaitable):


class _ContextManager(_Base[T]):

__slots__ = ("_coro", "_obj")

def __init__(self, coro: Awaitable[T]) -> None:
Expand Down
3 changes: 1 addition & 2 deletions aiozipkin/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


DEFAULT_TIMEOUT = aiohttp.ClientTimeout(total=5 * 60)
BATCHES_MAX_COUNT = 10 ** 4
BATCHES_MAX_COUNT = 10**4

DataList = List[Dict[str, Any]]
SndBatches = Deque[Tuple[int, DataList]]
Expand Down Expand Up @@ -157,7 +157,6 @@ def send(self, record: Record) -> None:

async def _send_data(self, data: DataList) -> bool:
try:

async with self._session.post(self._address, json=data) as resp:
body = await resp.text()
if resp.status >= 300:
Expand Down
1 change: 0 additions & 1 deletion examples/microservices/service_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ async def handler(request):


async def make_app():

app = web.Application()
app.router.add_get("/api/v1/data", handler)
app.router.add_get("/", handler)
Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
from setuptools import find_packages, setup # type: ignore


if sys.version_info < (3, 6, 0):
raise RuntimeError("aiozipkin does not support Python earlier than 3.6.0")


def read(f: str) -> str:
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()

Expand Down
3 changes: 0 additions & 3 deletions tests/test_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def test_noop_span_methods(tracer: Tracer) -> Any:


def test_trace_join_span(tracer: Tracer, context: Any) -> None:

with tracer.join_span(context) as span:
span.name("name")

Expand All @@ -107,7 +106,6 @@ def test_trace_join_span(tracer: Tracer, context: Any) -> None:


def test_trace_new_child(tracer: Tracer, context: Any) -> None:

with tracer.new_child(context) as span:
span.name("name")

Expand All @@ -117,7 +115,6 @@ def test_trace_new_child(tracer: Tracer, context: Any) -> None:


def test_span_new_child(tracer: Tracer, context: Any, fake_transport: Any) -> None:

with tracer.new_child(context) as span:
span.name("name")
with span.new_child("child", "CLIENT") as child_span1:
Expand Down
1 change: 0 additions & 1 deletion tests/test_zipkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ async def test_zipkin_error(
async def test_leak_in_transport(
zipkin_url: str, client: aiohttp.ClientSession, loop: asyncio.AbstractEventLoop
) -> None:

tracemalloc.start()

endpoint = az.create_endpoint("simple_service")
Expand Down

0 comments on commit e930248

Please sign in to comment.