Skip to content

SDK-2743-python-expose-idv-breakdown-process-property#453

Open
mehmet-yoti wants to merge 1 commit intodevelopmentfrom
SDK-2743-python-expose-idv-breakdown-process-property
Open

SDK-2743-python-expose-idv-breakdown-process-property#453
mehmet-yoti wants to merge 1 commit intodevelopmentfrom
SDK-2743-python-expose-idv-breakdown-process-property

Conversation

@mehmet-yoti
Copy link
Copy Markdown
Contributor

Summary

  • Add process property to BreakdownResponse to expose the breakdown process type
    (AUTOMATED / EXPERT_REVIEW)
  • Field is a nullable string, defaults to None when absent

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support in the Doc Scan session retrieval models to expose the breakdown “process” type (e.g., AUTOMATED / EXPERT_REVIEW) via BreakdownResponse.process, including test coverage for presence/absence.

Changes:

  • Parse process from breakdown response payloads and store it on BreakdownResponse.
  • Add process property accessor to BreakdownResponse.
  • Extend breakdown response unit tests to validate process and its default of None.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
yoti_python_sdk/doc_scan/session/retrieve/breakdown_response.py Adds process parsing and exposes it via a new process property.
yoti_python_sdk/tests/doc_scan/session/retrieve/test_breakdown_response.py Updates tests to assert process is parsed and defaults to None when absent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 27 to +29
assert result.sub_check is self.SOME_SUB_CHECK
assert result.result is self.SOME_RESULT
assert result.process is self.SOME_PROCESS
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

These assertions use is for string comparison. is checks object identity and can be flaky depending on interning; use == for comparing the returned string values (sub_check, result, process). Keep is None only for None checks.

Suggested change
assert result.sub_check is self.SOME_SUB_CHECK
assert result.result is self.SOME_RESULT
assert result.process is self.SOME_PROCESS
assert result.sub_check == self.SOME_SUB_CHECK
assert result.result == self.SOME_RESULT
assert result.process == self.SOME_PROCESS

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +47
def process(self):
"""
The process of the sub check

:return: the process
:rtype: str or None
"""
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Docstring for process is a bit unclear relative to the API meaning described in the PR (breakdown process type). Consider updating it to explicitly state this is the breakdown process type (e.g., AUTOMATED / EXPERT_REVIEW) and use consistent terminology ("sub-check" vs "sub check").

Copilot uses AI. Check for mistakes.
@nikhilPank nikhilPank self-requested a review April 7, 2026 14:14
Copy link
Copy Markdown
Contributor

@nikhilPank nikhilPank left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants