From ebd62622995e13e829da4dbf10ab68be41ba6094 Mon Sep 17 00:00:00 2001 From: Thomas M Kehrenberg Date: Tue, 26 Sep 2023 11:55:33 +0200 Subject: [PATCH] Increase the isort line length I need this because otherwise I cannot use ruff's formatter. --- pyproject.toml | 2 +- ranzen/torch/data.py | 1 + ranzen/types.py | 10 +--------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2de7da29..0165d142 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ reportPrivateUsage = "none" reportUnnecessaryTypeIgnoreComment = "warning" [tool.ruff] -line-length = 88 # for import sorting +line-length = 100 select = [ "E", # pycodestyle "F", # pyflakes diff --git a/ranzen/torch/data.py b/ranzen/torch/data.py index 4801355a..cd0da06f 100644 --- a/ranzen/torch/data.py +++ b/ranzen/torch/data.py @@ -67,6 +67,7 @@ class Subset(Generic[D]): r""" Subset of a dataset at specified indices. """ + dataset: D indices: Sequence[int] diff --git a/ranzen/types.py b/ranzen/types.py index 940361b0..d3b571bd 100644 --- a/ranzen/types.py +++ b/ranzen/types.py @@ -1,14 +1,6 @@ from __future__ import annotations from dataclasses import Field -from typing import ( - Any, - ClassVar, - Protocol, - TypedDict, - TypeVar, - get_type_hints, - runtime_checkable, -) +from typing import Any, ClassVar, Protocol, TypedDict, TypeVar, get_type_hints, runtime_checkable from typing_extensions import Self, TypeGuard __all__ = ["Addable", "DataclassInstance", "Sized", "is_td_instance"]