# HG changeset patch # User Anton Shestakov # Date 1704055322 10800 # Node ID e3cf5f68da1ca924144c4fea8bc217b83fe292af # Parent da6224c38e0749fc50f65f078fc367e08a53a90a rewind: opts is guaranteed to have the required keys, access them directly This helps pytype see that they aren't optional, and now it no longer complains that None doesn't have `append` method. diff -r da6224c38e07 -r e3cf5f68da1c hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Sun Dec 31 16:58:49 2023 -0300 +++ b/hgext3rd/evolve/rewind.py Sun Dec 31 17:42:02 2023 -0300 @@ -335,8 +335,8 @@ """ unfi = repo.unfiltered() targets = set() - revsto = opts.get('to') - revsfrom = opts.get('from') + revsto = opts['to'] + revsfrom = opts['from'] if not (revsto or revsfrom): revsfrom.append(b'.') if revsto: