Skip to content

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

Fix Flake8 errors

OmarFarrag9e6d5573f118
diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.py
index 7e9b12c0e..9b7445755 100644
--- a/scrapy/pipelines/files.py
+++ b/scrapy/pipelines/files.py
@@ -13,7 +13,6 @@ from collections import defaultdict
from email.utils import parsedate_tz, mktime_tz
from ftplib import FTP
from io import BytesIO
-from six.moves.urllib.parse import urlparse
from urllib.parse import urlparse
from twisted.internet import defer, threads
@@ -276,7 +275,7 @@ class FTPFilesStore(object):
self.password = u.password or self.FTP_PASSWORD
self.basedir = u.path.rstrip('/')
- def persist_file(self, path, buf, info, meta=None, headers=None):
+ def persist_file(self, path, buf, info, meta=None, headers=None):
path = '%s/%s' % (self.basedir, path)
return threads.deferToThread(
ftp_store_file, path=path, file=buf,
diff --git a/scrapy/utils/test.py b/scrapy/utils/test.py
index 61f2d059d..faac0b12f 100644
--- a/scrapy/utils/test.py
+++ b/scrapy/utils/test.py
@@ -67,7 +67,7 @@ def get_gcs_content_and_delete(bucket, path):
def get_ftp_content_and_delete(
- path, host, port,username,
+ path, host, port, username,
password, use_active_mode=False):
from ftplib import FTP
ftp = FTP()