OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

style: Refactor get_prompt function for readability and maintainability

Open Einswilli opened this issue 1 year ago • 4 comments

Optimize the get_prompt function by using a dictionary to map ActionType to hints, thus avoiding repetitions and making the code more readable and maintainable.

Einswilli avatar Apr 12 '24 12:04 Einswilli

Thanks! The hint logic is definitely cleaner

rbren avatar Apr 16 '24 14:04 rbren

@Einswilli just a few lint issues

rbren avatar Apr 17 '24 17:04 rbren

@Einswilli can you take a look at the lint issues?

rbren avatar Apr 19 '24 20:04 rbren

Sorry this is such a whack-a-mole 🙃 feel free to ping me in slack if you need another look

You can also run the pre-commit command from the github action to lint it on your local machine

rbren avatar Apr 19 '24 20:04 rbren