refactor(core)!: drop leading underscores from internal definitions

Renames 314 defs and 41 module/class-level constants. Keeps 11 names underscored where the stripped form collides in scope, plus 5.5.0 shims for the three symbols external service repos call.
This commit is contained in:
imSp4rky
2026-08-15 22:07:41 -06:00
parent db4f0b39f9
commit 21d5f1c5e1
116 changed files with 1671 additions and 1492 deletions
+5 -5
View File
@@ -6,7 +6,7 @@ import pytest
import requests as rq
from unshackle.core.constants import DOWNLOAD_CANCELLED
from unshackle.core.downloaders.requests import _has_range_header, download
from unshackle.core.downloaders.requests import download, has_range_header
from unshackle.core.downloaders.requests import requests as requests_downloader
# the package re-exports the `requests` function, shadowing the module of the same name
@@ -26,9 +26,9 @@ class _Server:
self.sock.listen(8)
self.url = f"http://127.0.0.1:{self.sock.getsockname()[1]}/seg.mp4"
self.requests = []
threading.Thread(target=self._serve, daemon=True).start()
threading.Thread(target=self.serve, daemon=True).start()
def _serve(self):
def serve(self):
while True:
try:
conn, _ = self.sock.accept()
@@ -63,7 +63,7 @@ class _Server:
@pytest.fixture(autouse=True)
def _clear_cancel():
def clear_cancel():
# the batch failure path sets the process-global cancel; leaking it makes every later
# test that waits on the event (the speed limiter) return instantly
DOWNLOAD_CANCELLED.clear()
@@ -161,4 +161,4 @@ def test_failed_segment_fails_the_batch(tmp_path, server):
],
)
def test_has_range_header(item, expected):
assert _has_range_header(item) is expected
assert has_range_header(item) is expected