Skip to content

Fix locals_overlow typo in Traceback.__init__#4010

Open
bysiber wants to merge 1 commit intoTextualize:masterfrom
bysiber:fix/traceback-locals-overflow-typo
Open

Fix locals_overlow typo in Traceback.__init__#4010
bysiber wants to merge 1 commit intoTextualize:masterfrom
bysiber:fix/traceback-locals-overflow-typo

Conversation

@bysiber
Copy link

@bysiber bysiber commented Feb 20, 2026

The Traceback.__init__ parameter locals_overlow is misspelled — it should be locals_overflow.

This means constructing a Traceback directly with the correct keyword locals_overflow=... raises TypeError: unexpected keyword argument. The only way to pass it currently is through from_exception, which maps the correct name to the typo internally.

Fixed the parameter name in __init__, the assignment in the body, and the keyword argument in from_exception.

@TomJGooding
Copy link
Contributor

Please read the AI policy before submitting further PRs: https://github.com/Textualize/rich/blob/master/AI_POLICY.md

You've opened over 100 pull requests in other projects in just the last day. Please consider the impact of automated PRs on open source projects, and at very least disclose that PRs are entirely AI generated.

Copy link
Member

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

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

Please add a test.

@@ -0,0 +1,5 @@
`_guess_lexer` uses `str.index()` to find the first newline in source code, but `index()` raises `ValueError` when the substring isn't found. The subsequent check `if new_line_index != -1` only makes sense with `str.find()`, which returns `-1` on miss.
Copy link
Member

Choose a reason for hiding this comment

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

This appears to be junk

@willmcgugan
Copy link
Member

@TomJGooding I don't know if anyone is listening. I'll give them the benefit of the doubt, just to see if there is a human on the other end.

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.

3 participants