From 17fed2ecf0c3a51ee97e5937956f27cc712021e5 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 11 Jun 2026 15:34:40 -0700 Subject: [PATCH 1/3] Switch ruff isort to one-import-per-line style The I rule was already enabled, but with combine-as-imports and default type-grouping. Switch to force-single-line and order-by-type=false to match the prior reorder-python-imports behaviour used across the other repos. Co-Authored-By: Claude Opus 4.8 (1M context) --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a9585b5..eec6ff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,4 +60,7 @@ max-complexity = 10 [tool.ruff.lint.isort] known-first-party = ["le_utils"] -combine-as-imports = true +# Match the prior reorder-python-imports style: one import per line, +# sorted case-insensitively rather than grouped by type. +force-single-line = true +order-by-type = false From 1e54be6ea46787429cd7a060bfa17187dbb6510a Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 11 Jun 2026 15:41:49 -0700 Subject: [PATCH 2/3] Reformat imports with ruff isort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One-time mechanical reformat from switching to force-single-line. No logic changes — only splitting combined imports onto separate lines. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/add_language.py | 4 +++- scripts/generate_from_specs.py | 3 ++- tests/test_schemas.py | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/add_language.py b/scripts/add_language.py index 29510c2..77b141b 100644 --- a/scripts/add_language.py +++ b/scripts/add_language.py @@ -4,7 +4,9 @@ import logging import os import sys -from typing import Any, Dict, Optional +from typing import Any +from typing import Dict +from typing import Optional try: import langcodes diff --git a/scripts/generate_from_specs.py b/scripts/generate_from_specs.py index cb00ea0..598daa1 100644 --- a/scripts/generate_from_specs.py +++ b/scripts/generate_from_specs.py @@ -15,7 +15,8 @@ from glob import glob from hashlib import md5 from importlib.metadata import version as get_version -from uuid import UUID, uuid3 +from uuid import UUID +from uuid import uuid3 try: FileNotFoundError diff --git a/tests/test_schemas.py b/tests/test_schemas.py index 6697c0a..c9ad672 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -8,7 +8,11 @@ import pytest -from le_utils.constants import completion_criteria, embed_content_request, embed_topics_request, learning_objectives, mastery_criteria +from le_utils.constants import completion_criteria +from le_utils.constants import embed_content_request +from le_utils.constants import embed_topics_request +from le_utils.constants import learning_objectives +from le_utils.constants import mastery_criteria try: # the jsonschema package for python 3.4 is too old, so if not present, we'll just skip From 9bb8a17d47a647b6f384b237ea962a27ffad8360 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 11 Jun 2026 15:42:30 -0700 Subject: [PATCH 3/3] Ignore import-reformat commit in git blame Co-Authored-By: Claude Opus 4.8 (1M context) --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 4cd29a6..118e45c 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,5 @@ # Migrate to ruff formatter (replaces black) fdf3066e3346c925faaf8fdc3746698588d77dad + +# Reformatted imports after switching ruff isort to one-per-line +1e54be6ea46787429cd7a060bfa17187dbb6510a