Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monkeypatch for group definitions to fix jurigged bug #55

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

JamesHutchison
Copy link
Owner

@JamesHutchison JamesHutchison commented Nov 30, 2023

  • Add monkeypatch for group definition
  • better explain monkeypatches

Jurigged is adding a blank line between things. It's not clear to me why. This creates a bug where the line numbers diverge from reality.

This PR also improves the explanations for the monkey patches.

Add monkeypatch for group definition
Comment on lines -145 to 151
if delta > 0:
if delta != 0:
self.recode(jurigged_utils.shift_lineno(co, delta), use_cache=False)
Copy link
Owner Author

Choose a reason for hiding this comment

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

While debugging I noticed this case and found that delta could be negative. It looked like the negative value, with the off-by-one fix, was correct, so that is why this changed to !=

@JamesHutchison
Copy link
Owner Author

It would be better that this was fixed in jurigged. I noticed the author was active very recently so I'll bring up these concerns there

@JamesHutchison JamesHutchison merged commit 537d786 into main Nov 30, 2023
1 check passed
@JamesHutchison JamesHutchison deleted the add-group-def-monkeypatch branch November 30, 2023 20:10
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.

1 participant