Skip to content

Commit

Permalink
black sweep
Browse files Browse the repository at this point in the history
  • Loading branch information
arthursoprana committed Oct 4, 2019
1 parent 871a4f9 commit 954f5c6
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/barril/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"""Top-level package for Barril."""

__author__ = """ESSS"""
Expand Down
1 change: 0 additions & 1 deletion src/barril/basic/format_float/_tests/test_format_float.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import locale

from barril.basic.format_float import FormatFloat, MINUS_INFINITY, NAN, PLUS_INFINITY
Expand Down
1 change: 0 additions & 1 deletion src/barril/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import pytest

from barril import units
Expand Down
11 changes: 9 additions & 2 deletions src/barril/units/_quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,16 @@ def Convert(self, value, to_unit):
An object with values to the passed unit.
"""
try:
return self._unit_database.Convert(self._composing_categories, self._composing_units, to_unit, value)
return self._unit_database.Convert(
self._composing_categories, self._composing_units, to_unit, value
)
except:
return self._unit_database.Convert(self._category, self._CreateUnitsWithJoinedExponentsString(), to_unit, value)
return self._unit_database.Convert(
self._category,
self._CreateUnitsWithJoinedExponentsString(),
to_unit,
value,
)

@classmethod
def _GetComparison(cls, operator, use_literals=False):
Expand Down
1 change: 0 additions & 1 deletion src/barril/units/_tests/test_posc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from barril import units
from barril.units import ObtainQuantity
from barril.units.posc import (
Expand Down
1 change: 0 additions & 1 deletion src/barril/units/_tests/test_posc2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import pytest
from pytest import approx

Expand Down
1 change: 0 additions & 1 deletion src/barril/units/_tests/test_posc_additional_units.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import pytest
from pytest import approx

Expand Down
9 changes: 7 additions & 2 deletions src/barril/units/_tests/test_scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
from barril import units
from barril._foundation.odict import odict
from barril.units import (
ChangeScalars, InvalidOperationError, InvalidUnitError, ObtainQuantity, Quantity, Scalar)
ChangeScalars,
InvalidOperationError,
InvalidUnitError,
ObtainQuantity,
Quantity,
Scalar,
)
from pytest import approx


Expand Down Expand Up @@ -596,7 +602,6 @@ def testScalarHashEq():


def testChangeScalars():

class Fluid:
density = Scalar(0, "lbm/galUS")
concentration = Scalar(0, "%")
Expand Down
1 change: 0 additions & 1 deletion src/barril/units/_tests/test_unit_database.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import pytest
from pytest import approx

Expand Down

0 comments on commit 954f5c6

Please sign in to comment.