superpathlib 2.0.11__tar.gz → 2.0.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {superpathlib-2.0.11/src/superpathlib.egg-info → superpathlib-2.0.12}/PKG-INFO +1 -1
- {superpathlib-2.0.11 → superpathlib-2.0.12}/pyproject.toml +1 -1
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/encryption.py +9 -5
- {superpathlib-2.0.11 → superpathlib-2.0.12/src/superpathlib.egg-info}/PKG-INFO +1 -1
- {superpathlib-2.0.11 → superpathlib-2.0.12}/LICENSE +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/README.md +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/setup.cfg +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/__init__.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/base.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/cached_content.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/common_folders.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/content_properties.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/extra_functionality.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/metadata_properties.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/override.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/path.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/py.typed +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/tags.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib/utils.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib.egg-info/SOURCES.txt +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib.egg-info/dependency_links.txt +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib.egg-info/requires.txt +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/src/superpathlib.egg-info/top_level.txt +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_cached_content.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_common_folders.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_content.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_encrypted_content.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_functionality.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_inheritance.py +0 -0
- {superpathlib-2.0.11 → superpathlib-2.0.12}/tests/test_metadata.py +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import getpass
|
|
3
4
|
import os
|
|
5
|
+
import shlex
|
|
4
6
|
import subprocess
|
|
5
7
|
from functools import cached_property
|
|
6
8
|
from typing import Any
|
|
@@ -21,12 +23,14 @@ class Path(extra_functionality.Path):
|
|
|
21
23
|
class EncryptedPath(Path):
|
|
22
24
|
@cached_property
|
|
23
25
|
def password(self) -> str: # pragma: nocover
|
|
26
|
+
if password := os.environ.get("FILE_ENCRYPTION_PASSWORD"):
|
|
27
|
+
return password
|
|
24
28
|
if "GITHUB_ACTION" in os.environ:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
command =
|
|
28
|
-
|
|
29
|
-
return
|
|
29
|
+
return "github_action_password"
|
|
30
|
+
if askpass := os.environ.get("FILE_ENCRYPTION_ASKPASS"):
|
|
31
|
+
command = shlex.split(askpass)
|
|
32
|
+
return subprocess.check_output(command).decode().strip() # noqa: S603
|
|
33
|
+
return getpass.getpass("Enter passphrase for file encryption: ")
|
|
30
34
|
|
|
31
35
|
@property
|
|
32
36
|
def encryption_command(self) -> tuple[str, ...]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|