Skip to content

Commit

Permalink
Fixing ruff complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 committed Aug 22, 2024
1 parent 8183d30 commit c03ea81
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/omlt/linear_tree/lt_formulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(self, lt_definition, epsilon=0):
Arguments:
lt_definition: LinearTreeDefinition Object
Keyword arguments:
Keyword Arguments:
epsilon: Tolerance to use in enforcing that choosing the right
branch of a linear tree node can only happen if the feature
is strictly greater than the branch value.(default: 0)
Expand Down Expand Up @@ -231,7 +231,7 @@ def _build_output_bounds(model_def, input_bounds):
return bounds


def _add_gdp_formulation_to_block(
def _add_gdp_formulation_to_block( # noqa: PLR0913
block, model_definition, input_vars, output_vars, transformation, epsilon
):
"""This function adds the GDP representation to the OmltBlock using Pyomo.GDP.
Expand All @@ -242,6 +242,9 @@ def _add_gdp_formulation_to_block(
input_vars: input variables to the linear tree model
output_vars: output variable of the linear tree model
transformation: Transformation to apply
epsilon: Tolerance to use in enforcing that choosing the right
branch of a linear tree node can only happen if the feature
is strictly greater than the branch value.
"""
leaves = model_definition.leaves
Expand Down

0 comments on commit c03ea81

Please sign in to comment.