From 7472c399fb6c795e0250af8f2111f99977411d3f Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Thu, 16 Sep 2021 07:58:21 -0400 Subject: [PATCH] Lint ignore some of the weird stuff in __init__. Adjusted flake8 & coverage ignores for the namespace package cruft and the import guards in the __init__ files. --- sprockets/__init__.py | 2 +- sprockets/mixins/__init__.py | 2 +- sprockets/mixins/mediatype/__init__.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sprockets/__init__.py b/sprockets/__init__.py index de40ea7..656dc0f 100644 --- a/sprockets/__init__.py +++ b/sprockets/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover diff --git a/sprockets/mixins/__init__.py b/sprockets/mixins/__init__.py index de40ea7..656dc0f 100644 --- a/sprockets/mixins/__init__.py +++ b/sprockets/mixins/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover diff --git a/sprockets/mixins/mediatype/__init__.py b/sprockets/mixins/mediatype/__init__.py index 0cdf763..2d54e3a 100644 --- a/sprockets/mixins/mediatype/__init__.py +++ b/sprockets/mixins/mediatype/__init__.py @@ -1,9 +1,9 @@ """sprockets.mixins.mediatype""" try: - from .content import (ContentMixin, ContentSettings, + from .content import (ContentMixin, ContentSettings, # noqa: F401 add_binary_content_type, add_text_content_type, set_default_content_type) -except ImportError as error: # noqa: F841 # pragma no cover +except ImportError: # pragma: no cover import warnings warnings.warn( 'Missing runtime requirements for sprockets.mixins.mediatype',