diff options
Diffstat (limited to 'build-aux/measurestack/analyze.py')
-rw-r--r-- | build-aux/measurestack/analyze.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build-aux/measurestack/analyze.py b/build-aux/measurestack/analyze.py index 93bf885..f454b7e 100644 --- a/build-aux/measurestack/analyze.py +++ b/build-aux/measurestack/analyze.py @@ -232,10 +232,10 @@ class AnalyzeResult(typing.NamedTuple): class SkipModel(typing.NamedTuple): """Running the skipmodel calls `.fn(chain, ...)` with the chain consisting of the last `.nchain` items (if .nchain is an int), or - the chain starting with the *last* occurance of `.nchain` (if - .nchain is a collection). If the chain is not that long or does - not contain a member of the collection, then .fn is not called and - the call is *not* skipped. + the chain starting with the *last* occurance of `.nchain` in + chain[:-1] (if .nchain is a collection). If the chain is not that + long or does not contain a member of the collection, then .fn is + not called and the call is *not* skipped. """ @@ -248,9 +248,9 @@ class SkipModel(typing.NamedTuple): _chain = chain[-self.nchain :] return self.fn(_chain, call), len(_chain) else: - for i in reversed(range(len(chain))): + for i in reversed(range(len(chain) - 1)): if chain[i].base() in self.nchain: - _chain = chain[i - 1 :] + _chain = chain[i:] return self.fn(_chain, call), len(_chain) return False, 0 |