Skip to content

fix: code quality issues#568

Merged
Roopan-Microsoft merged 2 commits intodevfrom
code-quality
Apr 29, 2026
Merged

fix: code quality issues#568
Roopan-Microsoft merged 2 commits intodevfrom
code-quality

Conversation

@Kanchan-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request includes several minor improvements and test code cleanups across the codebase. The main changes focus on improving test reliability, removing unnecessary code, and clarifying intent in asynchronous handlers.

Test code improvements:

  • Removed an unnecessary assertion in test_count_documents and ensured the mock was called correctly (src/tests/ContentProcessorAPI/libs/test_cosmos_db_helper.py).
  • Simplified singleton registration in test_with_factory by passing the class instead of a lambda (src/tests/ContentProcessorWorkflow/libs/application/test_application_context_di.py).
  • Cleaned up patching logic for the handler decorator in test_rai_executor (src/tests/ContentProcessorWorkflow/steps/test_rai_executor.py).
  • Removed the unused import of sitecustomize from the test configuration (src/tests/ContentProcessorWorkflow/conftest.py).

Async handler clarity:

  • Updated async polling handlers to assign the awaited result to _, clarifying that the result is intentionally ignored (src/ContentProcessorWorkflow/src/services/content_process_service.py, src/ContentProcessorWorkflow/src/utils/http_request.py).

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
TOTAL121016186% 
report-only-changed-files is enabled. No files were changed during this commit :)

Tests Skipped Failures Errors Time
242 0 💤 0 ❌ 0 🔥 3.980s ⏱️

Co-authored-by: Copilot <copilot@github.com>
@Roopan-Microsoft Roopan-Microsoft merged commit 99917aa into dev Apr 29, 2026
9 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the code-quality branch April 29, 2026 07:12
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.

2 participants