Skip to content

Commit

Permalink
chore: improved readability
Browse files Browse the repository at this point in the history
  • Loading branch information
smolvik1 committed Nov 13, 2023
1 parent d13dc3e commit 09f6a0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pysand/erosion.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ def validate_inputs(**kwargs) -> bool:
logger.warning('Height of the weld, h, must positive number not exceeding pipe inner diameter size, D')

# choke gallery
for l in ['R_c', 'gap', 'H']:
if l in kwargs:
if not kwargs[l] > 0:
raise exc.FunctionInputFail('{} has to be larger than 0'.format(l))
for param in ['R_c', 'gap', 'H']:
if param in kwargs:
if not kwargs[param] > 0:
raise exc.FunctionInputFail(f'{param} has to be larger than 0')
if 'R_c' in kwargs and 'gap' in kwargs:
if kwargs['gap'] > kwargs['R_c']:
raise exc.FunctionInputFail('The gap between the cage and choke body is larger than the radius')
Expand Down

0 comments on commit 09f6a0b

Please sign in to comment.