Skip to content

fix: restore dynamic imports removed by ruff modernization#188

Merged
waynesun09 merged 1 commit into
mainfrom
fix/ospcix-1150-missing-imports
Dec 19, 2025
Merged

fix: restore dynamic imports removed by ruff modernization#188
waynesun09 merged 1 commit into
mainfrom
fix/ospcix-1150-missing-imports

Conversation

@waynesun09

@waynesun09 waynesun09 commented Dec 19, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Restore ArrayOfEnumOptionId import that was accidentally removed in commit 992340c when ruff consolidated imports
  • Add Properties import which may be needed for other custom field types
  • Use # noqa: F401 comments to prevent future removal by ruff

Root Cause

The modernization commit 992340c ("chore: modernize tooling and drop legacy Python versions") accidentally removed the ArrayOfEnumOptionId import. The original # NOQA comment was not recognized by ruff when it consolidated imports from separate lines into one line.

This import is required for dynamic custom field type resolution in get_custom_fields() which uses globals()[type_name] to look up classes at runtime.

Test plan

  • Verify custom fields with ArrayOfEnumOptionId type work correctly
  • Run existing unit tests

The ArrayOfEnumOptionId import was accidentally removed in commit
992340c when ruff consolidated imports. The original # NOQA comment
was not recognized by ruff, causing the "unused" import to be removed.

This import is required for dynamic custom field type resolution in
get_custom_fields() which uses globals()[type_name] to look up classes.

Also adds Properties import which may be needed for other custom field
types.

Signed-off-by: Wayne Sun <gsun@redhat.com>
@waynesun09

Copy link
Copy Markdown
Collaborator Author

Verified by user and unit test

@waynesun09 waynesun09 merged commit 0a12375 into main Dec 19, 2025
6 checks passed
@waynesun09 waynesun09 deleted the fix/ospcix-1150-missing-imports branch December 19, 2025 14:30
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.

1 participant