This repository was archived by the owner on Apr 30, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/instructlab/sdg/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,7 +179,9 @@ def chunk_documents(self) -> List:
179179 all_chunks = []
180180 for conversion_result in parsed_documents :
181181 doc = conversion_result .document
182- chunker = HybridChunker (tokenizer = self .tokenizer , max_tokens = 500 )
182+ # max_tokens in HybridChunker is handled by a pydantic validation
183+ # hook, and mypy doesn't handle that. So, ignore mypy types here.
184+ chunker = HybridChunker (tokenizer = self .tokenizer , max_tokens = 500 ) # type: ignore
183185 try :
184186 chunk_iter = chunker .chunk (dl_doc = doc )
185187 chunks = [chunker .serialize (chunk = chunk ) for chunk in chunk_iter ]
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ wheel_build_env = pkg
1919deps = -r requirements-dev.txt
2020commands =
2121 unit: {envpython} -m pytest {posargs:tests --ignore =tests/functional}
22- unitcov: {envpython} -W error::UserWarning -m pytest --cov =instructlab.sdg --cov-report term --cov-report =html:coverage-{env_name} --cov-report =xml:coverage-{env_name}.xml --html =durations/{env_name}.html {posargs:tests --ignore =tests/functional -m " not (examples or gpu)" }
22+ unitcov: {envpython} -W error::UserWarning -m pytest --cov =instructlab.sdg --cov-report term --cov-report =html:coverage-{env_name} --cov-report =xml:coverage-{env_name}.xml --html =durations/{env_name}.html -p no:unraisableexception {posargs:tests --ignore =tests/functional -m " not (examples or gpu)" }
2323 functional: {envpython} -m pytest {posargs:tests/functional -m " not gpu" }
2424
2525# format, check, and linting targets don't build and install the project to
@@ -68,13 +68,10 @@ allowlist_externals = sh
6868
6969[testenv:mypy]
7070description = Python type checking with mypy
71- # Note: 'mypy<1.14' by default pulls the latest 'pydantic' release as a dependency, but 'pydantic>=2.10' does not
72- # work with 'mypy<1.14', so for compatibility purposes, we set 'pydantic<=2.9.2'
7371deps =
74- mypy>=1.10.0,<1.14
72+ mypy
7573 types-PyYAML
7674 pytest
77- pydantic<=2.9.2
7875commands =
7976 mypy src
8077
You can’t perform that action at this time.
0 commit comments