Skip to content

Commit

Permalink
lint: enable TID252
Browse files Browse the repository at this point in the history
  • Loading branch information
tklockau committed Oct 28, 2024
1 parent abf238e commit 4cb020e
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: ruff-format
name: Run Formatter
- id: ruff
name: Run Linter
args: [ --fix ]
- id: ruff-format
name: Run Formatter

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ ignore = [
"TCH003", # same as TCH001

"SIM103", # less readable in some cases imo

# to be removed later
"TID252",
]

[tool.mypy]
Expand Down
2 changes: 1 addition & 1 deletion raillabel_providerkit/_util/_attribute_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from enum import Enum

from ..exceptions import ValueDoesNotMatchTypeError
from raillabel_providerkit.exceptions import ValueDoesNotMatchTypeError


class AttributeType(Enum):
Expand Down
3 changes: 2 additions & 1 deletion raillabel_providerkit/convert/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import raillabel

from ..exceptions import UnsupportedFormatError
from raillabel_providerkit.exceptions import UnsupportedFormatError

from . import loader_classes as loader_classes_pkg
from .loader_classes import LoaderABC

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
import jsonschema
import raillabel

from ..._util._warning import _WarningsLogger
from ...format import understand_ai as uai_format
from raillabel_providerkit._util._warning import _WarningsLogger
from raillabel_providerkit.format import understand_ai as uai_format

from ._loader_abc import LoaderABC


Expand Down
3 changes: 2 additions & 1 deletion raillabel_providerkit/format/understand_ai/_annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from dataclasses import dataclass
from uuid import UUID

from ..._util._attribute_type import AttributeType
from raillabel_providerkit._util._attribute_type import AttributeType

from ._translation import translate_class_id, translate_sensor_id
from .sensor_reference import SensorReference

Expand Down
3 changes: 2 additions & 1 deletion raillabel_providerkit/format/understand_ai/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from dataclasses import dataclass
from decimal import Decimal

from ..._util._warning import _warning
from raillabel_providerkit._util._warning import _warning

from ._annotation import _Annotation
from ._translation import translate_class_id, translate_sensor_id
from .bounding_box_2d import BoundingBox2d
Expand Down
3 changes: 2 additions & 1 deletion raillabel_providerkit/format/understand_ai/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

from dataclasses import dataclass

from ..._util._warning import _warning
from raillabel_providerkit._util._warning import _warning

from .coordinate_system import CoordinateSystem
from .frame import Frame
from .metadata import Metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import raillabel
import yaml

from ...exceptions import OnthologySchemaError
from raillabel_providerkit.exceptions import OnthologySchemaError

from ._onthology_classes._onthology import _Onthology


Expand Down

0 comments on commit 4cb020e

Please sign in to comment.