Imports to top of file (ruff rule now). Refactor a couple of import cycles by implementing clear hierarchy of modules.
This commit is contained in:
@@ -8,6 +8,7 @@ from uuid import uuid4
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
from Crypto.Hash import MD4
|
||||
from sanic import Sanic
|
||||
|
||||
from cista import auth, config, session, watching
|
||||
@@ -29,8 +30,6 @@ def _ntlm_type3(
|
||||
username: str, password: str, domain: str, challenge: bytes
|
||||
) -> dict[str, str]:
|
||||
"""Build an NTLMv2 Type 3 message for testing."""
|
||||
from Crypto.Hash import MD4
|
||||
|
||||
# NT hash
|
||||
nt_hash = MD4.new(password.encode("utf-16le")).digest()
|
||||
# NTLMv2 hash
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from pathlib import Path
|
||||
from pathlib import Path, PurePath
|
||||
from uuid import uuid4
|
||||
|
||||
import msgspec
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
from sanic import Sanic
|
||||
@@ -11,10 +12,6 @@ from cista.auth import bp as auth_bp
|
||||
|
||||
|
||||
def _persist_config():
|
||||
from pathlib import PurePath
|
||||
|
||||
import msgspec
|
||||
|
||||
def enc_hook(obj):
|
||||
if isinstance(obj, PurePath):
|
||||
return obj.as_posix()
|
||||
|
||||
Reference in New Issue
Block a user