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

Switch from u00b5 to u03bc for micro #153

Merged
merged 4 commits into from
Jun 17, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ you run into issues please let us know by `opening an issue on GitHub
>>> units.kilometer
km
>>> units.microsecond
µs
μs

See `PR #68 <https://github.com/yt-project/unyt/pull/68>`_.
* The ``unyt`` codebase is now automatically formatted by `black
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ deps =
black ; python_version >= '3.6.0'
setuptools
matplotlib
docutils
commands =
pytest --cov=unyt --cov-append --doctest-modules --doctest-plus --doctest-rst --basetemp={envtmpdir} -W once
coverage report --omit='.tox/*'
Expand Down
6 changes: 4 additions & 2 deletions unyt/_unit_lookup_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ def append_name(n, okey, key):
# Are we SI prefixable or not?
if entry[4]:
for prefix in unit_prefixes:
if prefix in ["u", "μ"]:
used_prefix = "µ"
# This is specifically to work around
# https://github.com/yt-project/unyt/issues/145
if prefix in ["u", "μ", "µ"]:
used_prefix = "μ"
else:
used_prefix = prefix
append_name(names[prefix + key], used_prefix + key, prefix + key)
Expand Down
4 changes: 2 additions & 2 deletions unyt/tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ def test_attosecond():
def test_micro():
from unyt import Unit

assert str(Unit("um")) == "µm"
assert str(Unit("us")) == "µs"
assert str(Unit("um")) == "μm"
assert str(Unit("us")) == "μs"


def test_show_all_units_doc_table_ops():
Expand Down