Skip to content

Commit

Permalink
Typing improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Feb 21, 2025
1 parent 573efb7 commit 618a3be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions tests/test_nested_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def test_scrapy_item(self):
except ImportError:
self.skipTest("Cannot import Field or Item from scrapy")

# needs py.typed in Scrapy
class TestItem(Item): # type: ignore[misc]
class TestItem(Item):
foo = Field()

self._test_item(TestItem(foo="bar"))
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ commands =
[testenv:typing]
basepython = python3
deps =
mypy==1.14.1
mypy==1.15.0
attrs>=18.2.0
Scrapy==2.12.0
types-jmespath==1.0.2.20240106
commands =
mypy --strict --ignore-missing-imports --implicit-reexport {posargs:itemloaders tests}
mypy --strict --implicit-reexport {posargs:itemloaders tests}

[testenv:pre-commit]
basepython = python3
Expand Down

0 comments on commit 618a3be

Please sign in to comment.