Skip to content

Commit

Permalink
Update docs workflow to only trigger on docs changes and update type …
Browse files Browse the repository at this point in the history
…hint for python3.8 compatibility
  • Loading branch information
Wesley van Lee committed Oct 15, 2024
1 parent 0ca1caf commit f20de0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
paths:
- docs/**
- mkdocs.yml

jobs:
deploy:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ line-ending = "auto"
[tool.mypy]
strict = false
ignore_missing_imports = true
python_version = "3.8"
4 changes: 2 additions & 2 deletions scrapy_webarchive/wacz.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import zipfile
from collections import defaultdict
from typing import IO, Generator, List, Union
from typing import IO, Generator, List, Union, Dict

from warc import WARCReader as BaseWARCReader
from warc.warc import WARCRecord
Expand Down Expand Up @@ -134,7 +134,7 @@ def _get_index(wacz_file: zipfile.ZipFile) -> Union[gzip.GzipFile, IO]:

raise FileNotFoundError("No valid index file found.")

def _parse_index(self, index_file: Union[gzip.GzipFile, IO]) -> dict[str, List[CdxjRecord]]:
def _parse_index(self, index_file: Union[gzip.GzipFile, IO]) -> Dict[str, List[CdxjRecord]]:
cdxj_records = defaultdict(list)

for line in index_file:
Expand Down

0 comments on commit f20de0b

Please sign in to comment.