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

Fix wavelength range print out to use regular nbsp #1466

Merged
merged 1 commit into from Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion satpy/dataset/dataid.py
Expand Up @@ -127,7 +127,7 @@ def __hash__(self):

def __str__(self):
"""Format for print out."""
return "{0.central}{0.unit} ({0.min}-{0.max}{0.unit})".format(self)
return "{0.central} {0.unit} ({0.min}-{0.max} {0.unit})".format(self)

def __contains__(self, other):
"""Check if this range contains *other*."""
Expand Down
4 changes: 2 additions & 2 deletions satpy/tests/test_dataset.py
Expand Up @@ -536,5 +536,5 @@ def test_wavelength_range():
wr2 in wr

# Check __str__
assert str(wr) == "2µm (1-3µm)"
assert str(wr2) == "2nm (1-3nm)"
assert str(wr) == "2 µm (1-3 µm)"
assert str(wr2) == "2 nm (1-3 nm)"