Fix problem reading AASTex table without trailing backslashes at end#5427
Merged
taldcroft merged 1 commit intoastropy:masterfrom Dec 2, 2016
Merged
Fix problem reading AASTex table without trailing backslashes at end#5427taldcroft merged 1 commit intoastropy:masterfrom
taldcroft merged 1 commit intoastropy:masterfrom
Conversation
Member
Author
|
cc: @hamogu |
hamogu
approved these changes
Nov 9, 2016
Member
hamogu
left a comment
There was a problem hiding this comment.
Looks good to me. (The inline comment I left is clearly irrelevant since exactly this is tested in the tests.)
| """Remove whitespace at the beginning or end of line. Also remove | ||
| \\ at end of line""" | ||
| line = line.split('%')[0] | ||
| line = RE_COMMENT.split(line)[0] |
Member
There was a problem hiding this comment.
I don't know enough about regexpes: What is the line has white space list so: `data1 & data2 \ %and now a comment``?
MSeifert04
reviewed
Nov 16, 2016
| if line[-2:] == r'\\': | ||
| line = line.strip(r'\\') | ||
| if line.endswith(r'\\'): | ||
| line = line.rstrip(r'\\') |
Contributor
There was a problem hiding this comment.
I think you can remove the if line.endswith(r'\\'): if you use rstrip. If it doesn't ends with \\ it just does nothing.
Member
Author
There was a problem hiding this comment.
@MSeifert04 - yup, that's correct. But in the interest not clogging up CI even more I'm merging this as-is. After the 1.3 frenzy quiets we can do this clean up.
taldcroft
added a commit
to taldcroft/astropy
that referenced
this pull request
Dec 2, 2016
taldcroft
added a commit
that referenced
this pull request
Dec 3, 2016
Remove debugging "print" introduced in #5427
eteq
pushed a commit
that referenced
this pull request
Dec 13, 2016
Fix problem reading AASTex table without trailing backslashes at end
Member
|
backported to v1.0.x in 1f7cb64 |
eteq
pushed a commit
that referenced
this pull request
Dec 18, 2016
Fix problem reading AASTex table without trailing backslashes at end
eteq
pushed a commit
that referenced
this pull request
Dec 21, 2016
Fix problem reading AASTex table without trailing backslashes at end
eteq
pushed a commit
that referenced
this pull request
Dec 21, 2016
Remove debugging "print" introduced in #5427
eteq
pushed a commit
that referenced
this pull request
Dec 21, 2016
Remove debugging "print" introduced in #5427
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.
Closes #5236. (By superceding).