Skip to content

Commit

Permalink
Merge pull request #253 from The-4th-Hokage/deepsource-transform-a4b3…
Browse files Browse the repository at this point in the history
…4277

Format code with yapf, black, autopep8 and isort
  • Loading branch information
Dhruvacube authored Oct 22, 2021
2 parents 095d682 + 69bc4ed commit 37c1393
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions minato_namikaze/bot_files/lib/mendeleev/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,7 @@ def mass_str(self) -> str:
if self.is_radioactive:
return "[{aw:.0f}]".format(aw=self.atomic_weight)
return "{aw:.3f}".format(aw=self.atomic_weight)
dec = int(
abs(math.floor(math.log10(abs(self.atomic_weight_uncertainty)))))
dec = int(abs(math.floor(math.log10(abs(self.atomic_weight_uncertainty)))))
dec = min(dec, 5)
if self.is_radioactive:
return "[{aw:.{dec}f}]".format(aw=self.atomic_weight, dec=dec)
Expand Down

0 comments on commit 37c1393

Please sign in to comment.