From 24d6ac1f529e1e2ea5b04cff30cf9015311ef420 Mon Sep 17 00:00:00 2001 From: Matthew Donoughe Date: Thu, 20 Oct 2022 20:03:38 -0400 Subject: [PATCH] downgrade the last 3.9 type hints --- scrapy/pipelines/files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapy/pipelines/files.py b/scrapy/pipelines/files.py index ffb12d910..4e0211d1b 100644 --- a/scrapy/pipelines/files.py +++ b/scrapy/pipelines/files.py @@ -14,7 +14,7 @@ from contextlib import suppress from ftplib import FTP from io import BytesIO from pathlib import Path -from typing import Optional +from typing import DefaultDict, Optional, Set from urllib.parse import urlparse from itemadapter import ItemAdapter @@ -46,7 +46,7 @@ class FSFilesStore: basedir = basedir.split('://', 1)[1] self.basedir = basedir self._mkdir(Path(self.basedir)) - self.created_directories: defaultdict[str, set[str]] = defaultdict(set) + self.created_directories: DefaultDict[str, Set[str]] = defaultdict(set) def persist_file(self, path: str, buf, info, meta=None, headers=None): absolute_path = self._get_filesystem_path(path)