Refactor code style and improve documentation
CI / Quality Checks (push) Failing after 12s
CI / Test Suite (push) Successful in 10s

- Standardized string quotes to single quotes across all files.
- Added docstrings to several functions and classes for better clarity.
- Updated mypy configuration in pyproject.toml for enhanced type checking.
- Ignored specific linting rules for test files in ruff configuration.
- Improved error messages in exception handling for better user feedback.
- Cleaned up code formatting and structure for consistency.
This commit is contained in:
ВяткинАртём
2026-05-27 17:24:30 +03:00
parent 1c3228e039
commit d7cbd876ea
23 changed files with 214 additions and 203 deletions
+1 -1
View File
@@ -3,4 +3,4 @@ from __future__ import annotations
from .download import DownloadedVideo
from .session import SessionCookie, SessionValidation
__all__ = ["DownloadedVideo", "SessionCookie", "SessionValidation"]
__all__ = ['DownloadedVideo', 'SessionCookie', 'SessionValidation']
+3 -1
View File
@@ -5,6 +5,8 @@ from dataclasses import dataclass
@dataclass(frozen=True, slots=True)
class DownloadedVideo:
"""In-memory representation of a downloaded MP4 file."""
filename: str
content: bytes
media_type: str = "video/mp4"
media_type: str = 'video/mp4'
@@ -5,6 +5,8 @@ from dataclasses import dataclass
@dataclass(frozen=True, slots=True)
class SessionCookie:
"""Normalized cookie parsed from a Netscape session file."""
domain: str
include_subdomains: bool
path: str
@@ -16,6 +18,8 @@ class SessionCookie:
@dataclass(frozen=True, slots=True)
class SessionValidation:
"""Validation result for a candidate session cookie file."""
exists: bool
structurally_valid: bool
fresh: bool