• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hgrecco / pint / 1771 / 15
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 15 Jun 2020 11:00PM UTC
Files 18
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jun 2020 10:37PM UTC coverage: 88.422%. Remained the same
PKGS="python=3.8 numpy uncertainties"

push

travis-ci

web-flow
Merge #1106

1106: Fix exponent superscripting in HTML r=hgrecco a=clarkgwillison

- [ ] Closes # (no issue filed)
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file

This PR fixes two issues with exponent rendering of decimal quantities. The first was causing units with exponents that were longer than 1 character not to superscript properly in HTML views, such as used by Jupiter, and the second was causing rendered exponents in the terminal to look less than ideal.

## HTML View
In electronics, noise density is often expressed in units of Volts per sqrt(Hertz), but prior to this change that unit rendered like so:

![image](https://user-images.githubusercontent.com/253574/83940713-0ee6d600-a79b-11ea-8467-0889b46fb311.png)

By adding brackets around the exponent in the format string, we achieve the following:

![image](https://user-images.githubusercontent.com/253574/83941036-f1b30700-a79c-11ea-870e-e457f93c919b.png)

## Terminal Pretty Print
Using the unicode dot operator instead of a plain period (.) makes decimal exponents looks slightly more natural.

Before:
```
nV/Hz⁰.⁵
```
After:
```
nV/Hz⁰⋅⁵
```

Co-authored-by: Clark Willison <clarkgwillison@gmail.com>

3620 of 4094 relevant lines covered (88.42%)

0.88 hits per line

Source Files on job 1771.15 (PKGS="python=3.8 numpy uncertainties")
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1646
  • Travis Job 1771.15
  • af723fac on github
  • Prev Job for PKGS="python=3.8 numpy uncertainties" on master (#1769.15)
  • Next Job for PKGS="python=3.8 numpy uncertainties" on master (#1776.15)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc