Skip to content

Commit

Permalink
Enable ruff import lint
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed Nov 5, 2023
1 parent dd7d29f commit deaaae7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ include_namespace_packages = true
# formatting

[tool.ruff]
extend-select = ["I"]
extend-exclude = [
"vendor",
"venv",
Expand Down
3 changes: 1 addition & 2 deletions test/_cli/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
from pathlib import Path

import pytest
from hexdoc._cli.app import export, render
from hexdoc_hexcasting import _hooks
from pytest import MonkeyPatch, TempPathFactory
from syrupy.assertion import SnapshotAssertion

from hexdoc._cli.app import export, render

from ..conftest import longrun

HEXCASTING_PROPS_FILE = Path("test/_submodules/HexMod/doc/properties.toml")
Expand Down
3 changes: 1 addition & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
from typing import Any

import pytest
from hexdoc.plugin import PluginManager
from pytest import MonkeyPatch, Parser
from syrupy.assertion import SnapshotAssertion
from syrupy.extensions.single_file import SingleFileSnapshotExtension, WriteMode
from syrupy.types import SerializableData, SerializedData

from hexdoc.plugin import PluginManager

longrun = pytest.mark.skipif("not config.getoption('longrun')")
nox_only = pytest.mark.skipif("not config.getoption('nox')")

Expand Down
1 change: 0 additions & 1 deletion test/core/test_resource.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from hexdoc.core.resource import ItemStack, ResLoc, ResourceLocation

resource_locations: list[tuple[str, ResourceLocation, str]] = [
Expand Down
7 changes: 3 additions & 4 deletions test/hooks/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
from typing import Any, Callable

import pytest
from jinja2.sandbox import SandboxedEnvironment
from markupsafe import Markup
from pytest import FixtureRequest, Mark

from hexdoc._cli.utils.render import create_jinja_env
from hexdoc.plugin import (
PluginManager,
UpdateJinjaEnvImpl,
UpdateTemplateArgsImpl,
hookimpl,
)
from jinja2.sandbox import SandboxedEnvironment
from markupsafe import Markup
from pytest import FixtureRequest, Mark

RenderTemplate = Callable[[], str]

Expand Down
3 changes: 1 addition & 2 deletions test/utils/test_types.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import pytest
from pydantic import TypeAdapter, ValidationError

from hexdoc.model.types import Color
from hexdoc.utils.types import PydanticOrderedSet
from pydantic import TypeAdapter, ValidationError

colors: list[str] = [
"#0099FF",
Expand Down

0 comments on commit deaaae7

Please sign in to comment.