Skip to content

Commit 290b4fd

Browse files
committed
get ruff passing
1 parent 8c2d3df commit 290b4fd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

looptrace_loci_vis/points_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ._types import PathLike, QCFailReasons
1313
from .point_record import PointRecord
1414

15-
Input = TypeVar("Input", contravariant=True)
15+
Input = TypeVar("Input", contravariant=True) # noqa: PLC0105
1616
I1 = TypeVar("I1")
1717
I2 = TypeVar("I2", bound=Sized)
1818

looptrace_loci_vis/reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def filename_extension(self) -> str: # noqa: D102
5555
raises=dict(RuntimeError="If collection of QC statuses inferred from files doesn't make sense"),
5656
returns="A function to create layers from folder path, if folder path is parsable",
5757
)
58-
def get_reader(path: PathOrPaths) -> Optional[Reader]: # noqa: D103
58+
def get_reader(path: PathOrPaths) -> Optional[Reader]: # noqa: D103, C901, PLR0911, PLR0912
5959
if isinstance(path, str):
6060
path: Path = Path(path) # type: ignore[no-redef]
6161
if not isinstance(path, Path):

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ strict_optional = true
102102
line-length = 100
103103
target-version = "py310"
104104

105+
[tool.ruff.lint.per-file-ignores]
106+
"tests/*.py" = [
107+
"INP001", # part of an implicit namespace package
108+
"D103", # Missing docstring in public function
109+
"ANN201", # Missing return type annotation for public function
110+
]
111+
105112
[tool.ruff.lint]
106113
select = ["ALL"]
107114
ignore = [
@@ -113,6 +120,7 @@ ignore = [
113120
# Opinionated syntax
114121
"D203", # Ignore this to instead opt for class body or docstring to possibly start right away under class.
115122
"D213", # Ignore this to instead opt for summary part of docstring to be on first physical line.
123+
"D401", # First line of docstring should be in imperative mood
116124
"TRY003", # Avoid specifying long messages outside the exception class
117125
"C408", # Unnecessary `dict` call (rewrite as a literal)
118126
"EM", # Exception must not use a (f-)string literal, assign to variable first

0 commit comments

Comments
 (0)