mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
update ruff and enable flake8-logging-format and flake8-type-checking (#8894)
* update ruff and enable flake8-logging-format and flake8-type-checking check * Update dvc/external_repo.py * Update dvc/fs/dvc.py * Update dvc/repo/experiments/__init__.py * Update dvc/repo/experiments/queue/base.py * Update pyproject.toml
This commit is contained in:
@@ -2,13 +2,11 @@ import datetime
|
||||
import textwrap
|
||||
|
||||
import pytest
|
||||
from pytest import CaptureFixture
|
||||
from pytest_mock import MockerFixture
|
||||
|
||||
from dvc.ui import Console
|
||||
|
||||
|
||||
def test_write(capsys: CaptureFixture[str]):
|
||||
def test_write(capsys):
|
||||
"""Test that ui.write works."""
|
||||
console = Console(enable=True)
|
||||
message = "hello world"
|
||||
@@ -44,9 +42,7 @@ def test_write(capsys: CaptureFixture[str]):
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_write_json(
|
||||
capsys: CaptureFixture[str], mocker: MockerFixture, isatty, expected_output
|
||||
):
|
||||
def test_write_json(capsys, mocker, isatty, expected_output):
|
||||
"""Test that ui.write_json works."""
|
||||
|
||||
console = Console(enable=True)
|
||||
@@ -57,7 +53,7 @@ def test_write_json(
|
||||
assert captured.out == expected_output
|
||||
|
||||
|
||||
def test_capsys_works(capsys: CaptureFixture[str]):
|
||||
def test_capsys_works(capsys):
|
||||
"""Sanity check that capsys can capture outputs from a global ui."""
|
||||
from dvc.ui import ui
|
||||
|
||||
|
||||
Reference in New Issue
Block a user