-
Notifications
You must be signed in to change notification settings - Fork 169
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
Fix line formatting of error message #586
Conversation
python3/vimspector/debug_session.py
Outdated
text = [ line for lines in [ | ||
'Launch Failed', | ||
'', | ||
reason.splitlines(), | ||
'', | ||
'Use :VimspectorReset to close' | ||
] for line in ( lines if isinstance( lines, list ) else [ lines ] ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I can make this more readable by wrapping the 4 literal strings into []
and simplify the list comprehension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @Aster89 and @puremourning)
python3/vimspector/debug_session.py
line 1522 at r1 (raw file):
Previously, Aster89 wrote…
Maybe I can make this more readable by wrapping the 4 literal strings into
[]
and simplify the list comprehension?
Yeah this is super convoluted. Use python + operator to add the lists together.
From a conversation on gitter: > it's probably this actually: https://github.com/puremourning/vimspector/blob/4c693f33e3038c1199e0f2e1045f340339714b60/python3/vimspector/debug_session.py#L1519 > > should probably be `reason.splitlines()`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @Aster89 and @puremourning)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Aster89)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dismissed @Aster89 from a discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Aster89)
Thanks for sending a PR! |
From a conversation on gitter:
This is the first code ever I write in Python. I'm happy to learn what's wrong (or what would be better) with it 😄