Skip to content

Remove code duplication.#1302

Merged
amjith merged 5 commits into
mainfrom
amjith/fix-output-res
Aug 10, 2025
Merged

Remove code duplication.#1302
amjith merged 5 commits into
mainfrom
amjith/fix-output-res

Conversation

@amjith

@amjith amjith commented Aug 4, 2025

Copy link
Copy Markdown
Member

Also use nonlocal for mutating.

Description

Fixes the output_res() return signature.
Dedupes the code from output_res()

Checklist

  • I've added this contribution to the changelog.md.
  • I've added my name to the AUTHORS file (or it's already there).
  • I ran uv ruff check && uv ruff format to lint and format the code.

@amjith amjith requested a review from rolandwalker August 9, 2025 22:00
Comment thread mycli/main.py
)

t = time() - start
try:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In this try block, we should probably also restore from the deleted code:

                        if self.beep_after_seconds > 0 and t >= self.beep_after_seconds:
                            self.bell()
                        if special.is_timing_enabled():
                            self.echo("Time: %0.03fs" % t)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks! Fixed it.

@amjith amjith merged commit 9c03fb3 into main Aug 10, 2025
8 checks passed
@rolandwalker rolandwalker deleted the amjith/fix-output-res branch January 21, 2026 15:33
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