# HG changeset patch # User Martin von Zweigbergk # Date 2019-10-12 22:12:54 # Node ID 96c4c6f37d52807c399a9584e0bb1254d40fdda1 # Parent 99f2d939f03c12aaab60bbc78200008aaaec9477 fix: remove a never-true check for unset pattern in Fixer.affects() We don't create an instance of a Fixer if the pattern is None, so we don't need to check that in affects(). Differential Revision: https://phab.mercurial-scm.org/D7086 diff --git a/hgext/fix.py b/hgext/fix.py --- a/hgext/fix.py +++ b/hgext/fix.py @@ -845,9 +845,7 @@ class Fixer(object): def affects(self, opts, fixctx, path): """Should this fixer run on the file at the given path and context?""" - return self._pattern is not None and scmutil.match( - fixctx, [self._pattern], opts - )(path) + return scmutil.match(fixctx, [self._pattern], opts)(path) def shouldoutputmetadata(self): """Should the stdout of this fixer start with JSON and a null byte?"""