Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Fix flake8-detected errors.

Andrey Rakhmatulline291460db67e
diff --git a/scrapy/crawler.py b/scrapy/crawler.py
index 19b998e0d..8868a985b 100644
--- a/scrapy/crawler.py
+++ b/scrapy/crawler.py
@@ -3,7 +3,6 @@ import signal
import logging
import warnings
-import sys
from twisted.internet import reactor, defer
from zope.interface.verify import verifyClass, DoesNotImplement
diff --git a/scrapy/exporters.py b/scrapy/exporters.py
index 8eb52995e..3defafd60 100644
--- a/scrapy/exporters.py
+++ b/scrapy/exporters.py
@@ -4,7 +4,6 @@ Item Exporters are used to export/serialize items into different formats.
import csv
import io
-import sys
import pprint
import marshal
import six
diff --git a/scrapy/http/cookies.py b/scrapy/http/cookies.py
index 4532c3ab7..60a14c6f8 100644
--- a/scrapy/http/cookies.py
+++ b/scrapy/http/cookies.py
@@ -166,7 +166,7 @@ class WrappedRequest(object):
def get_header(self, name, default=None):
return to_unicode(self.request.headers.get(name, default),
- errors='replace')
+ errors='replace')
def header_items(self):
return [
diff --git a/scrapy/link.py b/scrapy/link.py
index be1888ef0..a809c5ca4 100644
--- a/scrapy/link.py
+++ b/scrapy/link.py
@@ -4,6 +4,8 @@ This module defines the Link object used in Link extractors.
For actual link extractors implementation see scrapy.linkextractors, or
its documentation in: docs/topics/link-extractors.rst
"""
+
+
class Link(object):
"""Link objects represent an extracted link by the LinkExtractor."""
diff --git a/tests/test_pipeline_media.py b/tests/test_pipeline_media.py
index ad2618ec9..ad958e25f 100644
--- a/tests/test_pipeline_media.py
+++ b/tests/test_pipeline_media.py
@@ -1,7 +1,5 @@
from __future__ import print_function
-import sys
-
from testfixtures import LogCapture
from twisted.trial import unittest
from twisted.python.failure import Failure