Skip to content

Conversation

@holtskinner
Copy link
Member

@holtskinner holtskinner commented May 15, 2025

Reduce copy/pasting detected by JSCPD

Clone found (python):
 - src/a2a/server/request_handlers/jsonrpc_handler.py [195:23 - 217:22] (22 lines, 124 tokens)
   src/a2a/server/request_handlers/jsonrpc_handler.py [121:23 - 143:15]

Clone found (python):
 - src/a2a/server/request_handlers/default_request_handler.py [256:9 - [27](https://github.com/google-a2a/a2a-python/actions/runs/15401445094/job/43334752070?pr=27#step:4:29)9:5] (23 lines, 179 tokens)
   src/a2a/server/request_handlers/default_request_handler.py [171:9 - 192:16]

Clone found (python):
 - src/a2a/server/request_handlers/default_request_handler.py [[28](https://github.com/google-a2a/a2a-python/actions/runs/15401445094/job/43334752070?pr=27#step:4:30)1:13 - [29](https://github.com/google-a2a/a2a-python/actions/runs/15401445094/job/43334752070?pr=27#step:4:31)1:6] (10 lines, 80 tokens)
   src/a2a/server/request_handlers/default_request_handler.py [191:17 - 201:70]

Clone found (python):
 - src/a2a/server/request_handlers/default_request_handler.py [408:9 - 423:6] (15 lines, 125 tokens)
   src/a2a/server/request_handlers/default_request_handler.py [109:9 - 123:6]

Clone found (python):
 - src/a2a/server/agent_execution/request_context_builder.py [12:5 - 20:5] (8 lines, 96 tokens)
   src/a2a/server/agent_execution/simple_request_context_builder.py [20:5 - 28:14]

Clone found (python):
 - src/a2a/utils/telemetry.py [192:2 - 212:7] (20 lines, 1[33](https://github.com/google-a2a/a2a-python/actions/runs/15401445094/job/43334752070?pr=27#step:4:35) tokens)
   src/a2a/utils/telemetry.py [158:2 - 178:11]

@holtskinner holtskinner requested a review from a team as a code owner May 15, 2025 18:13
@holtskinner holtskinner requested a review from a team as a code owner May 28, 2025 21:52
**kwargs,
)

return async_wrapper if is_async_func else sync_wrapper
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what is the need for two wrappers now, since they internally call the same function.

Maybe directly return the _invoke_with_tracing.

@rajeshvelicheti could you confirm.

@holtskinner holtskinner closed this Jun 2, 2025
@holtskinner holtskinner deleted the jscpd-fixes branch July 21, 2025 19:17
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.

6 participants