You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix all mypy errors due to incorrect typing after the SDK v2 merge
(#135).
Logic changes should be minimal, this is mostly to change type hints
where a `httpx.Response` is used instead of a `requests.Response`, etc.
I removed some `form_utils.py` functions where we no longer need to
convert a httpx request back to Requests. There's more we can cleanup in
here, but let's get the V2 migration settled first.
Add mypy to `make lint` so that we can cath these errors before merging.
The publish job runs a full linter suite, and these changes made it to
main but broke the publish job.
Also, remove the Patch Custom Code step that I added to the generate.
This broke the job. There are some minor changes to the Speakeasy code
on the main branch. In the short term, this means we'll have to run
`make patch-custom-code` whenever we regenerate.
# To verify
Make sure you can lint and run the tests locally. `make lint` and `make
test`. You can also verify that the pdf split behavior has not changed
with a call to your local server:
```
from unstructured_client import UnstructuredClient
from unstructured_client.models import shared, operations
import json
filename = "_sample_docs/layout-parser-paper.pdf"
s = UnstructuredClient(
server_url="http://localhost:8000",
)
with open(filename, "rb") as f:
files=shared.Files(
content=f,
file_name=filename,
)
req = operations.PartitionRequest(
shared.PartitionParameters(
files=files,
strategy="fast",
split_pdf_page_range=[4,8],
),
)
resp = s.general.partition(req)
print(json.dumps(resp.elements, indent=4))
```
0 commit comments