Commit 7f88cff
fix: suppress DeprecationWarning on ctx.protected_args access (Click 9 compat)
Accessing ctx.protected_args emits the warning even when guarded by an
if-check. Wrap the access in warnings.catch_warnings() to silence it;
fall back to ctx.args[0] for Click 9.0 where the subcommand moves there.
Co-Authored-By: Oz <oz-agent@warp.dev>1 parent 38d2edc commit 7f88cff
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
0 commit comments