Skip to content

Commit

Permalink
errorhandling: use new generic typing syntax
Browse files Browse the repository at this point in the history
Ref: https://peps.python.org/pep-0695/
Change-Id: I4977ac4b70e28c1b82c51a5547d31ecbfe050ec3
  • Loading branch information
logan-connolly committed Jan 9, 2025
1 parent 1fc4b59 commit ac2fca8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmk/base/errorhandling/_crash.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import traceback
from pathlib import Path
from typing import Any, Generic, Literal, Sequence, TypedDict, TypeVar
from typing import Any, Literal, Sequence, TypedDict

import cmk.ccc.debug
import cmk.ccc.version as cmk_version
Expand Down Expand Up @@ -115,10 +115,7 @@ def create_check_crash_dump(
return "check failed - failed to create a crash report: %s" % traceback.format_exc()


T = TypeVar("T")


class CrashReportWithAgentOutput(Generic[T], crash_reporting.ABCCrashReport[T]):
class CrashReportWithAgentOutput[T](crash_reporting.ABCCrashReport[T]):
def __init__(
self,
crashdir: Path,
Expand Down

0 comments on commit ac2fca8

Please sign in to comment.