ITADN

Do not ask which file to restore if there is only one option

#369Pull RequestGideonBear 创建于 2025-08-01
G
GideonBearcommented
Ref #175, #359 When a path is passed, and only a single option is available, automatically select that option without waiting for user input. The information usually printed during the selection screen is still printed. Rationale: the only reason to have a selection when there is only one option, would be to have the option to cancel, but when I explicitly supply a filename, why would I want to? I know what I'm restoring (since I'm passing the filename). When I *don't* supply a filename, it would IMO not be a good idea to skip this step; since 1. the user doesn't know what file they are restoring and 2. it could just be to list the files able to be restored. `restore_asking_the_user` and `RestoreAskingTheUser` having a path specifically *not* asking the user is a bit weird, and could be improved; but I wasn't sure how, I would appreciate some help there. `mypy .` passes `pytest` passes
合并状态:未合并 0 条评论