yd-cli 0.4__tar.gz → 0.6__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.
- {yd_cli-0.4 → yd_cli-0.6}/PKG-INFO +1 -1
- {yd_cli-0.4 → yd_cli-0.6}/pyproject.toml +1 -1
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/cli.py +5 -3
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/commands.py +3 -3
- {yd_cli-0.4 → yd_cli-0.6}/LICENSES/MIT.txt +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/README.md +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/__init__.py +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/__main__.py +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/execution.py +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/io.py +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/py.typed +0 -0
- {yd_cli-0.4 → yd_cli-0.6}/src/yd/types.py +0 -0
|
@@ -9,6 +9,7 @@ from __future__ import annotations
|
|
|
9
9
|
|
|
10
10
|
import dataclasses
|
|
11
11
|
import itertools as it
|
|
12
|
+
import logging
|
|
12
13
|
import re
|
|
13
14
|
import sys
|
|
14
15
|
from typing import TYPE_CHECKING, Annotated
|
|
@@ -127,9 +128,9 @@ def _setup_io() -> None:
|
|
|
127
128
|
console.print("Failed to capture environment.", style="error")
|
|
128
129
|
raise typer.Exit(2) from err
|
|
129
130
|
|
|
130
|
-
if env.log_level is
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
if env.log_level is None:
|
|
132
|
+
logging.basicConfig(level=logging.CRITICAL)
|
|
133
|
+
else:
|
|
133
134
|
import msgspec
|
|
134
135
|
|
|
135
136
|
logging.basicConfig(
|
|
@@ -198,6 +199,7 @@ def _clip_path(path: str, *, max_len: int, prefix: str = ".../") -> str:
|
|
|
198
199
|
# Use `list` as return value since type must be available at runtime for typer to work.
|
|
199
200
|
# Argument is passed as kwarg by typer.
|
|
200
201
|
def _complete_config_name(incomplete: str) -> list[str]:
|
|
202
|
+
env = yd.io.capture_environment()
|
|
201
203
|
return [
|
|
202
204
|
path.stem
|
|
203
205
|
for path in env.config_dir.glob("*.toml")
|
|
@@ -94,6 +94,8 @@ def create( # noqa: PLR0915
|
|
|
94
94
|
_complete_path(Path(target_home), home=env.home_dir),
|
|
95
95
|
)
|
|
96
96
|
|
|
97
|
+
# Initially had "--prune-empty-dirs" to remove directories with no files in the
|
|
98
|
+
# target. But that might break autocreate structures like git repos.
|
|
97
99
|
base_args = [
|
|
98
100
|
"--mkpath", # Create target directory if it does not exist.
|
|
99
101
|
"--recursive", # Recurse into directories.
|
|
@@ -111,7 +113,6 @@ def create( # noqa: PLR0915
|
|
|
111
113
|
"--times", # Retains modification times (important for quick change check).
|
|
112
114
|
"--atimes", # Keep access times.
|
|
113
115
|
"--open-noatime",
|
|
114
|
-
"--prune-empty-dirs", # Remove directories with no files in the target.
|
|
115
116
|
"--out-format", # Set output format to show
|
|
116
117
|
out_format,
|
|
117
118
|
]
|
|
@@ -123,8 +124,7 @@ def create( # noqa: PLR0915
|
|
|
123
124
|
base_args.extend(
|
|
124
125
|
(
|
|
125
126
|
"--fuzzy", # Search for similar files in the target and use matches to
|
|
126
|
-
"--fuzzy", # speed up transfers (2x
|
|
127
|
-
"--fuzzy", # list).
|
|
127
|
+
"--fuzzy", # speed up transfers (2x = search the full transfer list).
|
|
128
128
|
)
|
|
129
129
|
)
|
|
130
130
|
if cg.mtp_target:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|