]> git.pld-linux.org Git - packages/flake8.git/blob - flake8-duplicate.patch
- updated to 3.7.9
[packages/flake8.git] / flake8-duplicate.patch
1 Don't register plugin if it's already registered; fixes tests with flake8 already installed.
2 --- flake8-3.7.9/src/flake8/plugins/manager.py.orig     2020-01-12 19:41:12.510479228 +0100
3 +++ flake8-3.7.9/src/flake8/plugins/manager.py  2020-01-12 19:43:26.916417755 +0100
4 @@ -268,6 +268,9 @@
5              Is this a repo-local plugin?
6          """
7          name = entry_point.name
8 +        if name in self.names:
9 +            LOG.warning('Skipping duplicate plugin "%s"' % name)
10 +            return
11          self.plugins[name] = Plugin(name, entry_point, local=local)
12          self.names.append(name)
13          LOG.debug('Loaded %r for plugin "%s".', self.plugins[name], name)
This page took 0.097658 seconds and 3 git commands to generate.