Closed preritdas closed 2 months ago
[!CAUTION]
Review failed
The pull request is closed.
The changes enhance the functionality of the BaseAnalyzer
and PhoneValidator
classes. The analyze
method's return type is modified to support either a string or a dictionary, allowing for more versatile outputs. The PhoneValidator
class now incorporates a retry mechanism for API validation, while a new CallableValidator
class is introduced to streamline the validation process for phone numbers and DNC status. These modifications improve the overall validation logic and robustness.
Files | Change Summary |
---|---|
real_intent/analyze/base.py |
Updated analyze and _analyze methods to return a union type (str | dict[str, str] ). Adjusted documentation accordingly. |
real_intent/validate/phone.py |
Added _validate_with_retry method for retries in PhoneValidator . Updated _validate_phone to raise ValueError on invalid API responses. Removed docstring from DNCValidator constructor. Introduced CallableValidator class to combine phone and DNC validation. |
analyze
method in the BaseAnalyzer
class, changing its return type to a union type (str | dict[str, str]
), which aligns with the changes made in the main PR.🐰 In the meadow where bunnies play,
New features hop in, brightening the day!
With retries and checks, our code's now spry,
Validating numbers as clouds drift by.
Hooray for the changes, let’s dance and cheer,
For a smoother path, our goals are clear! 🌼✨
__init__
_analyze
, the log-wrappedanalyze
, and thePerLeadInsightGenerator
's implemented_analyze
Summary by CodeRabbit
New Features
CallableValidator
class to streamline phone number and DNC validation.Bug Fixes
Documentation
analyze
method to reflect new return types.