Fix locals_overlow typo in Traceback.__init__#4010
Open
bysiber wants to merge 1 commit intoTextualize:masterfrom
Open
Fix locals_overlow typo in Traceback.__init__#4010bysiber wants to merge 1 commit intoTextualize:masterfrom
bysiber wants to merge 1 commit intoTextualize:masterfrom
Conversation
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. |
willmcgugan
requested changes
Feb 20, 2026
| @@ -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. | |||
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Traceback.__init__parameterlocals_overlowis misspelled — it should belocals_overflow.This means constructing a
Tracebackdirectly with the correct keywordlocals_overflow=...raisesTypeError: unexpected keyword argument. The only way to pass it currently is throughfrom_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 infrom_exception.