Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potentially unnecessary class inheritance in the ClientInfo class #481

Open
rosiezou opened this issue Jan 29, 2023 · 1 comment
Open

potentially unnecessary class inheritance in the ClientInfo class #481

rosiezou opened this issue Jan 29, 2023 · 1 comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@rosiezou
Copy link
Contributor

I noticed that there are two implementations of the ClientInfo class inside the api_core repo. One in google/api_core/client_info.py and one in google/api_core/gapic_v1/client_info.py. The ClientInfo class in the gapic_v1 directory inherits from the ClientInfo class in the parent directory, and it appears that there are no other references to the to_user_agent function except for its invocation in ClientInfo.to_grpc_metadata in gapic_v1/client_info.py. Could this function and other member variables in the parent class be folded into the child class?

@vchudnov-g vchudnov-g added type: cleanup An internal cleanup or hygiene concern. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 30, 2023
@vchudnov-g
Copy link
Contributor

Thanks for noticing this! We'll take a look when we next get a chance to inspect our architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

2 participants