Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ client = Client(
- `search_type` (SearchType): fisica or moral.
- `search_list` (tuple[SearchList, ...]): Lists to search.
If not provided, searches all.
- `include_history` (bool | None): If `True`, include historical records; if `False`, only current; if `None`, use API default.

The search follows a hierarchical approach: it first attempts to find a match using the RFC.
If no match is found, it searches by CURP. Finally, if neither is found, it looks for a match by name.
Expand Down
2 changes: 2 additions & 0 deletions quienesquien/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ async def search(
birthday: dt.date | None = None,
search_type: SearchType | None = None,
search_list: tuple[SearchList, ...] | None = None,
include_history: bool | None = None,
) -> list[Person]:
"""Perform a search request and return the results.

Expand Down Expand Up @@ -105,6 +106,7 @@ async def search(
'birthday': birthday.strftime('%d/%m/%Y') if birthday else None,
'type': search_type.value if search_type is not None else None,
'list': ','.join(search_list) if search_list else None,
'include_history': include_history,
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a Python boolean (True/False) is passed as a query parameter through httpx, it will be serialized as the capitalized string "True" or "False". Many REST APIs expect lowercase "true"/"false" or numeric "1"/"0" values for boolean parameters. You should verify that the API accepts "True"/"False" strings, or convert the boolean to the expected format. For example, you could use str(include_history).lower() if the API expects lowercase, or implement a converter function that maps True->1 and False->0 if the API expects numeric values.

Suggested change
'include_history': include_history,
'include_history': str(include_history).lower() if include_history is not None else None,

Copilot uses AI. Check for mistakes.
}

params = {k: v for k, v in params.items() if v is not None}
Expand Down
2 changes: 1 addition & 1 deletion quienesquien/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.3'
__version__ = '1.0.4'
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ types-requests==2.*
pytest-asyncio==0.*
pytest-mock==3.*
respx==0.*
vcrpy==7.0.*
Loading