Skip to content

Refactor return statement to simplify get_supported_llm_models method#11947

Merged
enyst merged 1 commit intoOpenHands:mainfrom
VascoSch92:patch-1
Dec 9, 2025
Merged

Refactor return statement to simplify get_supported_llm_models method#11947
enyst merged 1 commit intoOpenHands:mainfrom
VascoSch92:patch-1

Conversation

@VascoSch92
Copy link
Copy Markdown
Contributor

Summary of PR

I was looking inside the code and I saw this small nit, and I decided to open a PR. My small contribution to this fantastic project ;-) .

Here, you are doing list(sorted(set(model_list))) but sorted returns already a list ref. Therefore, this is equivalent to have sorted(set(model_list)), and you spare a method call.

Change Type

  • Bug fix
  • New feature
  • Breaking change
  • Refactor
  • Other (dependency update, docs, typo fixes, etc.)

Checklist

  • I have read and reviewed the code and I understand what the code is doing.
  • I have tested the code to the best of my ability and ensured it works as expected.

Fixes

Resolves #(issue)

Release Notes

  • Include this change in the Release Notes.

The method sorted returns already a list, i.e., list(sorted(set(model_list))) is just sorted(set(model_list))
@mamoodi mamoodi requested a review from enyst December 9, 2025 16:13
Copy link
Copy Markdown
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

Thank you!

@enyst enyst enabled auto-merge (squash) December 9, 2025 16:18
@enyst enyst merged commit df92923 into OpenHands:main Dec 9, 2025
24 of 25 checks passed
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