summaryrefslogtreecommitdiff
path: root/src/flake8/plugins
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2021-03-29 17:43:42 -0700
committerAnthony Sottile <asottile@umich.edu>2021-03-30 17:37:13 -0700
commit358ae85120b5336f6abf574688b1f7290b3c8cc4 (patch)
treeb19e95f7eac533e223fd20950c99f67f92f9df10 /src/flake8/plugins
parent8cc3fc01e8d06b2eb6fa59332b598b2c638a4d40 (diff)
downloadflake8-358ae85120b5336f6abf574688b1f7290b3c8cc4.tar.gz
automatic: pyupgrade --py36-plus
Diffstat (limited to 'src/flake8/plugins')
-rw-r--r--src/flake8/plugins/manager.py12
-rw-r--r--src/flake8/plugins/pyflakes.py5
2 files changed, 9 insertions, 8 deletions
diff --git a/src/flake8/plugins/manager.py b/src/flake8/plugins/manager.py
index 4f482dd..ab4cbd8 100644
--- a/src/flake8/plugins/manager.py
+++ b/src/flake8/plugins/manager.py
@@ -1,6 +1,10 @@
"""Plugin loading and management logic and classes."""
import logging
-from typing import Any, Dict, List, Optional, Set
+from typing import Any
+from typing import Dict
+from typing import List
+from typing import Optional
+from typing import Set
from flake8 import exceptions
from flake8 import utils
@@ -13,7 +17,7 @@ __all__ = ("Checkers", "Plugin", "PluginManager", "ReportFormatters")
NO_GROUP_FOUND = object()
-class Plugin(object):
+class Plugin:
"""Wrap an EntryPoint from setuptools and other logic."""
def __init__(self, name, entry_point, local=False):
@@ -219,7 +223,7 @@ class Plugin(object):
self.disable(optmanager)
-class PluginManager(object): # pylint: disable=too-few-public-methods
+class PluginManager: # pylint: disable=too-few-public-methods
"""Find and manage plugins consistently."""
def __init__(self, namespace, local_plugins=None):
@@ -342,7 +346,7 @@ def version_for(plugin):
return getattr(module, "__version__", None)
-class PluginTypeManager(object):
+class PluginTypeManager:
"""Parent class for most of the specific plugin types."""
namespace = None # type: str
diff --git a/src/flake8/plugins/pyflakes.py b/src/flake8/plugins/pyflakes.py
index e845483..5d51799 100644
--- a/src/flake8/plugins/pyflakes.py
+++ b/src/flake8/plugins/pyflakes.py
@@ -1,6 +1,4 @@
"""Plugin built-in to Flake8 to treat pyflakes as a plugin."""
-# -*- coding: utf-8 -*-
-from __future__ import absolute_import
import os
from typing import List
@@ -10,7 +8,6 @@ import pyflakes.checker
from flake8 import utils
-
FLAKE8_PYFLAKES_CODES = {
"UnusedImport": "F401",
"ImportShadowedByLoopVar": "F402",
@@ -96,7 +93,7 @@ class FlakesChecker(pyflakes.checker.Checker):
if overlaped_by:
with_doctest = True
- super(FlakesChecker, self).__init__(
+ super().__init__(
tree,
filename=filename,
withDoctest=with_doctest,