From a45ac4a9d6f16b29fc0d4635111d11e8c3eaee43 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sun, 13 Apr 2014 20:48:30 -0700 Subject: [PATCH] enable unused import checking The "noqa" marker is for exceptions such as these. --- beets/autotag/__init__.py | 6 +++--- beets/dbcore/__init__.py | 2 ++ beets/util/pipeline.py | 1 - beetsplug/rewrite.py | 1 - setup.cfg | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/beets/autotag/__init__.py b/beets/autotag/__init__.py index 90a597b28..b6e2c8f23 100644 --- a/beets/autotag/__init__.py +++ b/beets/autotag/__init__.py @@ -22,9 +22,9 @@ from beets import library, mediafile, config from beets.util import sorted_walk, ancestry, displayable_path # Parts of external interface. -from .hooks import AlbumInfo, TrackInfo, AlbumMatch, TrackMatch -from .match import tag_item, tag_album -from .match import Recommendation +from .hooks import AlbumInfo, TrackInfo, AlbumMatch, TrackMatch # noqa +from .match import tag_item, tag_album # noqa +from .match import Recommendation # noqa # Global logger. log = logging.getLogger('beets') diff --git a/beets/dbcore/__init__.py b/beets/dbcore/__init__.py index b4f80fb98..8c6e67152 100644 --- a/beets/dbcore/__init__.py +++ b/beets/dbcore/__init__.py @@ -18,3 +18,5 @@ Library. from .db import Model, Database from .query import Query, FieldQuery, MatchQuery, AndQuery, OrQuery from .types import Type + +# flake8: noqa diff --git a/beets/util/pipeline.py b/beets/util/pipeline.py index 92e5793fa..95b77b4da 100644 --- a/beets/util/pipeline.py +++ b/beets/util/pipeline.py @@ -35,7 +35,6 @@ from __future__ import print_function import Queue from threading import Thread, Lock import sys -import types BUBBLE = '__PIPELINE_BUBBLE__' POISON = '__PIPELINE_POISON__' diff --git a/beetsplug/rewrite.py b/beetsplug/rewrite.py index 5a9dfba92..44fd3753e 100644 --- a/beetsplug/rewrite.py +++ b/beetsplug/rewrite.py @@ -22,7 +22,6 @@ from collections import defaultdict from beets.plugins import BeetsPlugin from beets import ui from beets import library -from beets import config log = logging.getLogger('beets') diff --git a/setup.cfg b/setup.cfg index dc3262bd0..6a6a96f97 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,9 +3,8 @@ verbosity=1 logging-clear-handlers=1 [flake8] -# F401 module imported but unused # E231 missing whitespace after ',' (used to align visually) -ignore=F401,E241 +ignore=E241 # List of files that have not been cleand up yet. We will try to reduce # this with each commit