Spaces:
Paused
Paused
Peng Ding commited on
Commit ·
adeb1d5
1
Parent(s): 6fc1eee
chore: bump vendored readability 0.2.0→0.2.1 (flat sibling import fix)
Browse files
src/veilrender/_vendor/readability.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# /// zerodep
|
| 2 |
-
# version = "0.2.
|
| 3 |
# deps = ["soup"]
|
| 4 |
# tier = "medium"
|
| 5 |
# category = "text"
|
|
@@ -67,8 +67,8 @@ log = logging.getLogger(__name__)
|
|
| 67 |
|
| 68 |
|
| 69 |
def _ensure_sibling_path(name: str) -> str:
|
| 70 |
-
"""Add sibling module paths to ``sys.path`` for flat
|
| 71 |
-
base = os.path.dirname(__file__)
|
| 72 |
for candidate in [base, os.path.normpath(os.path.join(base, "..", name))]:
|
| 73 |
if candidate not in sys.path:
|
| 74 |
sys.path.insert(0, candidate)
|
|
|
|
| 1 |
# /// zerodep
|
| 2 |
+
# version = "0.2.1"
|
| 3 |
# deps = ["soup"]
|
| 4 |
# tier = "medium"
|
| 5 |
# category = "text"
|
|
|
|
| 67 |
|
| 68 |
|
| 69 |
def _ensure_sibling_path(name: str) -> str:
|
| 70 |
+
"""Add sibling module paths to ``sys.path`` for flat and nested layouts."""
|
| 71 |
+
base = os.path.dirname(os.path.abspath(__file__))
|
| 72 |
for candidate in [base, os.path.normpath(os.path.join(base, "..", name))]:
|
| 73 |
if candidate not in sys.path:
|
| 74 |
sys.path.insert(0, candidate)
|