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

Improve las_items.py:HeaderItem.__repr__ truncation logic #397

Merged
merged 1 commit into from Sep 13, 2020

Conversation

kinverarity1
Copy link
Owner

Previously long descr attributes might cause HeaderItem.__repr__ to become non-valid Python code:

HeaderItem(mnemonic="EXAMPLE", unit="", value="", descr="This is a long desc...)

This commit changes the truncation logic to remain valid code, even if the descr contents is slightly truncated.

HeaderItem(mnemonic="EXAMPLE", unit="", value="", descr="This is a long descri")

Not ideal, but an improvement

Previously long descr attributes might cause HeaderItem.__repr__
to become non-valid Python code:

    HeaderItem(mnemonic="EXAMPLE", unit="", value="", descr="This is a long desc...)

This commit changes the truncation logic to remain valid code,
even if the descr contents is slightly truncated.

    HeaderItem(mnemonic="EXAMPLE", unit="", value="", descr="This is a long descri")

Not ideal, but an improvement
@kinverarity1 kinverarity1 merged commit 4225ad7 into master Sep 13, 2020
@kinverarity1 kinverarity1 deleted the improve-repr branch September 13, 2020 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant