Scrapy, a fast high-level web crawling & scraping framework for Python.
Small cleanup.
Andrey Rakhmatullin8050257c1495
diff --git a/scrapy/extensions/feedexport.py b/scrapy/extensions/feedexport.pyindex 2bbcaf3ad..c1b77f4fb 100644--- a/scrapy/extensions/feedexport.py+++ b/scrapy/extensions/feedexport.py@@ -290,7 +290,8 @@ class FTPFeedStorage(BlockingFeedStorage):feed_options: Optional[Dict[str, Any]] = None,):u = urlparse(uri)- assert u.hostname+ if not u.hostname:+ raise ValueError(f"Got a storage URI without a hostname: {uri}")self.host: str = u.hostnameself.port: int = int(u.port or "21")self.username: str = u.username or ""diff --git a/scrapy/utils/iterators.py b/scrapy/utils/iterators.pyindex baf92681a..03d779afb 100644--- a/scrapy/utils/iterators.py+++ b/scrapy/utils/iterators.py@@ -85,7 +85,6 @@ def xmliter_lxml(reader = _StreamReader(obj)tag = f"{{{namespace}}}{nodename}" if namespace else nodename- # technically, etree.iterparse only needs .read() AFAICS, but this is how it's typediterable = etree.iterparse(cast("SupportsReadClose[bytes]", reader), tag=tag, encoding=reader.encoding)