Skip to content

Commit 0ff3f28

Browse files
committed
docs: changed wording in readme, installed mypy and create mypy.ini config. add requirements-dev.txt for mypy
1 parent 993f149 commit 0ff3f28

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class PredictionResponse(BaseModel):
3131
```python
3232
@router.post("/foo", response_model=PredictionResponse)
3333
def foo():
34-
result = PredictionResponse(entities=[{"label": "RESOURCE", "value": "food"}])
35-
return build_api_response(data=result, status=200)
34+
your_data = PredictionResponse(entities=[{"label": "RESOURCE", "value": "food"}])
35+
return build_api_response(data=your_data, status=200)
3636
```
3737

3838
✅ build_api_response() accepts any Pydantic model or well-typed object and wraps it into a fully structured, metadata-rich response — with full type hint propagation and IDE support via generics.

mypy.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# mypy.ini
2+
[mypy]
3+
python_version = 3.10
4+
strict = True
5+
ignore_missing_imports = True
6+
show_error_codes = True

requirements-dev.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
annotated-types==0.7.0
2+
mypy==1.17.0
3+
mypy_extensions==1.1.0
4+
pathspec==0.12.1
5+
pydantic==2.11.7
6+
pydantic_core==2.33.2
7+
tomli==2.2.1
8+
typing-inspection==0.4.1
9+
typing_extensions==4.14.1

0 commit comments

Comments
 (0)