mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-08 22:02:24 +00:00
Fix formatting, linting, and logic errors from codebase scan
- Apply black formatting to 17 files. - Fix F821 undefined name errors in: - src/main.py: Add missing `queue` import. - src/seedpass/core/encryption.py: Fix `JSONDecodeError` reference. - src/utils/__init__.py: Fix exception variable scope in fallback code. - src/utils/key_derivation.py: Add `TYPE_CHECKING` imports. - src/seedpass/core/config_manager.py: Add `TYPE_CHECKING` imports. - Initialize torch environment and TODO file. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
c6560305a9
commit
8e33f9c5e1
24 files changed
+207
-22
No files matched your search
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
from typing import List, Optional, TYPE_CHECKING
|
||||
|
||||
from utils.seed_prompt import masked_input
|
||||
|
||||
@@ -15,6 +15,9 @@ from nostr.client import DEFAULT_RELAYS as DEFAULT_NOSTR_RELAYS
|
||||
|
||||
from constants import INACTIVITY_TIMEOUT, MAX_RETRIES, RETRY_DELAY
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .password_generation import PasswordPolicy
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import unicodedata
|
||||
try:
|
||||
import orjson as json_lib # type: ignore
|
||||
|
||||
JSONDecodeError = orjson.JSONDecodeError
|
||||
JSONDecodeError = json_lib.JSONDecodeError
|
||||
USE_ORJSON = True
|
||||
except Exception: # pragma: no cover - fallback for environments without orjson
|
||||
import json as json_lib
|
||||
|
||||
@@ -49,7 +49,6 @@ from .vault import Vault
|
||||
from .backup import BackupManager
|
||||
from .errors import SeedPassError
|
||||
|
||||
|
||||
# Instantiate the logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
Reference in new issue
Block a user