core: cleanup/sort imports according to ruff check --select I

This commit is contained in:
Dima Gerasimov 2024-08-16 13:25:19 +03:00
parent 7023088d13
commit 478e288ea8
45 changed files with 235 additions and 170 deletions

View file

@ -1,11 +1,11 @@
from __future__ import annotations
from functools import lru_cache
import logging
import os
import sys
from typing import Union, TYPE_CHECKING
import warnings
from functools import lru_cache
from typing import TYPE_CHECKING, Union
def test() -> None:
@ -222,7 +222,9 @@ def make_logger(name: str, *, level: LevelIsh = None) -> logging.Logger:
# OK, when stdout is not a tty, enlighten doesn't log anything, good
def get_enlighten():
# TODO could add env variable to disable enlighten for a module?
from unittest.mock import Mock # Mock to return stub so cients don't have to think about it
from unittest.mock import (
Mock, # Mock to return stub so cients don't have to think about it
)
# for now hidden behind the flag since it's a little experimental
if os.environ.get('ENLIGHTEN_ENABLE', None) is None: