❯ ruff .
backend/infrahub/git/repository.py:1514:18: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/infrahub/git/repository.py:1616:14: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/api/test_60_storage.py:36:21: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/conftest.py:201:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/conftest.py:230:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/conftest.py:261:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/conftest.py:272:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/conftest.py:315:14: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/conftest.py:333:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/test_git_repository.py:56:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/test_git_repository.py:71:5: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/test_git_repository.py:128:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/test_git_repository.py:176:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/test_git_repository.py:345:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
backend/tests/unit/git/test_git_repository.py:703:10: ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
Found 15 errors.
Probably this would mostly mean to use aiofiles instead of plain open().
This rule has been added to the ruff config in #2448, however the failing sub rules has been added to the ignore section. The goal of this issue now is to remove those ignore lines.
Component
API Server / GraphQL, Git Integration
Task Description
We should activate the ASYNC linter for ruff and fix any code that breaks the rules.
Probably this would mostly mean to use aiofiles instead of plain
open()
.