From 13d4b79f7ff0d9d0ea70880b3276f85dea7f1f15 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 9 Mar 2024 22:08:19 +0200 Subject: [PATCH] Remove unused function `_removesuffix` --- pytest_asyncio/plugin.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pytest_asyncio/plugin.py b/pytest_asyncio/plugin.py index 5bfb234e..4008d375 100644 --- a/pytest_asyncio/plugin.py +++ b/pytest_asyncio/plugin.py @@ -6,7 +6,6 @@ import functools import inspect import socket -import sys import warnings from asyncio import AbstractEventLoopPolicy from textwrap import dedent @@ -656,12 +655,6 @@ def _patched_collect(): collector.obj.__pytest_asyncio_scoped_event_loop = scoped_event_loop -def _removesuffix(s: str, suffix: str) -> str: - if sys.version_info < (3, 9): - return s[: -len(suffix)] - return s.removesuffix(suffix) - - @contextlib.contextmanager def _temporary_event_loop_policy(policy: AbstractEventLoopPolicy) -> Iterator[None]: old_loop_policy = asyncio.get_event_loop_policy()