Skip to content

AI suggested edits#163

Open
perrygoy wants to merge 3 commits intoai_stufffrom
ai_suggested_edits
Open

AI suggested edits#163
perrygoy wants to merge 3 commits intoai_stufffrom
ai_suggested_edits

Conversation

@perrygoy
Copy link
Copy Markdown
Member

@perrygoy perrygoy commented Apr 2, 2026

This PR has a bunch of edits suggested by the AI after i asked it "look at the whole repo and make suggestions for improvements." It mostly found typos and stuff, i was hoping for something more substantial but it is right—these should be fixed, too!

@perrygoy perrygoy requested a review from bandophahita April 2, 2026 22:53
@perrygoy perrygoy changed the base branch from trunk to ai_stuff April 2, 2026 22:54
Comment thread screenpy/actions/pause.py
"""Use milliseconds and provide a reason for the pause."""
self.unit = f"millisecond{'s' if self.number != 1 else ''}"
self.time = self.time / 1000.0
self.time = self.number / 1000.0
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.

Hmmm, it’s not wrong nor does it seem needed since it’s an alias var

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.

This one was interesting, the AI said that if someone accidentally called milliseconds_because() two times, it would divide the original number by 1,000 again, making 1/1,000,000. If we use self.number instead, this method becomes idempotent!

Comment thread screenpy/pacing.py
from screenpy.narration import Narrator, StdOutAdapter
from screenpy.speech_tools import represent_prop
from .narration import Narrator, StdOutAdapter
from .speech_tools import represent_prop
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.

Not against this, but is it better?

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.

Before, screenpy.pacing was the only file that used absolute imports; all the others use relative imports.

Comment thread screenpy/configuration.py
import sys
from pathlib import Path
from typing import TYPE_CHECKING
import tomllib
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.

Does this work in all versions of python?

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.

Hm... i may have been overzealous on this one. I took its recommendation and made the edits myself. I think i was only supposed to take out the try/except bit, because that handling was only necessary when 3.11 was in alpha.

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