File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed
Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change 2929from taskiq .result_backends .dummy import DummyResultBackend
3030from taskiq .serializers .json_serializer import JSONSerializer
3131from taskiq .state import TaskiqState
32- from taskiq .utils import maybe_awaitable , remove_suffix
32+ from taskiq .utils import maybe_awaitable
3333from taskiq .warnings import TaskiqDeprecationWarning
3434
3535if sys .version_info >= (3 , 11 ):
@@ -317,10 +317,9 @@ def inner(
317317 fmodule = func .__module__
318318 if fmodule == "__main__" : # pragma: no cover
319319 fmodule = "." .join (
320- remove_suffix (
321- os .path .normpath (sys .argv [0 ]),
322- ".py" ,
323- ).split (os .path .sep ),
320+ os .path .normpath (sys .argv [0 ])
321+ .removesuffix (".py" )
322+ .split (os .path .sep ),
324323 )
325324 fname = func .__name__
326325 if fname == "<lambda>" :
Original file line number Diff line number Diff line change @@ -29,16 +29,3 @@ async def maybe_awaitable(
2929 if inspect .isawaitable (possible_coroutine ):
3030 return await possible_coroutine
3131 return possible_coroutine # type: ignore
32-
33-
34- def remove_suffix (text : str , suffix : str ) -> str :
35- """
36- Removing a Suffix from a String with a Custom Function.
37-
38- :param text: String
39- :param suffix: Removing a Suffix
40- :return: value.
41- """
42- if text .endswith (suffix ):
43- return text [: - len (suffix )]
44- return text
You can’t perform that action at this time.
0 commit comments