Skip to content

Commit

Permalink
Fix based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
alifbe committed Jan 30, 2024
1 parent 846350c commit ec52c6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions pyscal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ def getLogger_pyscal(
Logging output is by default split by logging levels (split between WARNING and
ERROR) to stdout and stderr, each log occurs in only one of the streams.
Args:
module_name: A suggested name for the logger, usually __name__ should be supplied
args_dict: Dictionary with contents from the argparse namespace object containing
only keys "output", "verbose" and "debug".
""" # noqa: E501
module_name: A suggested name for the logger, usually __name__ should be
supplied
args_dict: Dictionary with contents from the argparse namespace object
containing only keys "output", "verbose" and "debug".
"""
logger = logging.getLogger(module_name)
if len(logger.handlers) != 0:
return logger
Expand Down
4 changes: 2 additions & 2 deletions pyscal/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class PyscalFactory(object):
@staticmethod
def create_water_oil(
params: Optional[Dict[str, float]] = None, fast: bool = False
) -> WaterOil: # noqa
) -> WaterOil:
"""Create a WaterOil object from a dictionary of parameters.
Parameterization (Corey/LET) is inferred from presence
Expand Down Expand Up @@ -1208,7 +1208,7 @@ def filter_nan_from_dict(params: dict) -> dict:
"""
cleaned_params = {}
for key, value in params.items():
if (isinstance(value, str)) or (not np.isnan(value)):
if isinstance(value, str) or not np.isnan(value):
cleaned_params[key] = value
return cleaned_params

Expand Down
2 changes: 1 addition & 1 deletion tests/test_gaswater.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_gaswater_corey1(nw, ng):


@given(st.floats(), st.floats(), st.floats(), st.floats(), st.floats())
def test_gaswater_let1(l, e, t, krwend, krwmax): # noqa: E741
def test_gaswater_let1(l, e, t, krwend, krwmax):
"""Test random LET parameters"""
gaswater = GasWater()
try:
Expand Down

0 comments on commit ec52c6a

Please sign in to comment.