Repository navigation
feat: update API sources and regenerate - #19036
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Google Ads Ad Manager client library, adding several new services (such as AudienceSegmentCategoryService, ChangeEventService, ForecastAdjustmentService, ProposalService, TrafficForecastSegmentService, YieldGroupService, and YieldPartnerService) along with their corresponding transports, pagers, and types. It also extends existing services like CreativeService and LineItemCreativeAssociationService with new creation, update, and batch methods. Feedback on the changes identifies a critical issue in the REST base transport classes where the hash method returns a NotImplementedError instance instead of raising it, which will lead to a TypeError when hashed.
| def __hash__(self): # pragma: NO COVER | ||
| return NotImplementedError("__hash__ must be implemented.") |
There was a problem hiding this comment.
The __hash__ method returns a NotImplementedError instance instead of raising it. In Python, returning an exception object from a method does not raise it; instead, it will cause a TypeError when hash() is called because the return value is not an integer. It should be raised using the raise keyword.
| def __hash__(self): # pragma: NO COVER | |
| return NotImplementedError("__hash__ must be implemented.") | |
| def __hash__(self): # pragma: NO COVER | |
| raise NotImplementedError("__hash__ must be implemented.") |
| def __hash__(self): # pragma: NO COVER | ||
| return NotImplementedError("__hash__ must be implemented.") |
There was a problem hiding this comment.
The __hash__ method returns a NotImplementedError instance instead of raising it. In Python, returning an exception object from a method does not raise it; instead, it will cause a TypeError when hash() is called because the return value is not an integer. It should be raised using the raise keyword.
| def __hash__(self): # pragma: NO COVER | |
| return NotImplementedError("__hash__ must be implemented.") | |
| def __hash__(self): # pragma: NO COVER | |
| raise NotImplementedError("__hash__ must be implemented.") |
Update googleapis sources to a74d0502444d12c07abc7ed95f90ebb52950e918 and regenerate all libraries.
Debug Info
System Details
Commands Executed
librarian update sources.googleapislibrarian installlibrarian generate --alllibrarian tidygit add .git commit -m "feat: update API sources and regenerate"