Skip to content

Conversation

@taldcroft
Copy link
Member

@taldcroft taldcroft commented Oct 22, 2016

Closes #5236. (By superceding).

@taldcroft
Copy link
Member Author

cc: @hamogu

Copy link
Member

@hamogu hamogu left a comment

Choose a reason for hiding this comment

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

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]
Copy link
Member

Choose a reason for hiding this comment

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

I don't know enough about regexpes: What is the line has white space list so: `data1 & data2 \ %and now a comment``?

if line[-2:] == r'\\':
line = line.strip(r'\\')
if line.endswith(r'\\'):
line = line.rstrip(r'\\')
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can remove the if line.endswith(r'\\'): if you use rstrip. If it doesn't ends with \\ it just does nothing.

Copy link
Member Author

Choose a reason for hiding this comment

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

@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 taldcroft merged commit 4346abc into astropy:master Dec 2, 2016
@taldcroft taldcroft deleted the ascii-aastex-ending branch December 2, 2016 11:16
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
@eteq
Copy link
Member

eteq commented Dec 13, 2016

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
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.

4 participants