mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-19 20:55:14 +02:00
refactor: ruff autofixes
This commit is contained in:
455 files changed
+12322
-14762
No files matched your search
+2
-1
@@ -22,7 +22,6 @@ import unittest.mock
|
||||
|
||||
|
||||
class _asyncio_patch:
|
||||
|
||||
"""
|
||||
A wrapper around python patch supporting asyncio.
|
||||
Like the original patch you can use it as context
|
||||
@@ -52,11 +51,13 @@ class _asyncio_patch:
|
||||
def asyncio_patch(function, *args, **kwargs):
|
||||
return _asyncio_patch(function, *args, **kwargs)
|
||||
|
||||
|
||||
# monkey patch MagicMock,
|
||||
# FIXME: would probably be better to use asynctest or pytest.asyncio to test our asyncio code
|
||||
async def async_magic():
|
||||
pass
|
||||
|
||||
|
||||
unittest.mock.MagicMock.__await__ = lambda x: async_magic().__await__()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user