Repository: great-expectations/great_expectations

Issue:
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`


Discussion:
Done inline during improve_partitions push.

Resolving patch:
diff --git a/great_expectations/rule_based_profiler/parameter_builder/value_set_multi_batch_parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/value_set_multi_batch_parameter_builder.py
--- a/great_expectations/rule_based_profiler/parameter_builder/value_set_multi_batch_parameter_builder.py
+++ b/great_expectations/rule_based_profiler/parameter_builder/value_set_multi_batch_parameter_builder.py
@@ -95,35 +95,16 @@ def _build_parameters(
                 domain=domain,
                 parameter_reference=self.fully_qualified_parameter_name,
                 expected_return_type=None,
-                parameters={
-                    domain.id: parameter_container,
-                },
+                variables=variables,
+                parameters=parameters,
             )
         )
 
-        fully_qualified_parameter_name_details: str = (
-            f"{self.fully_qualified_parameter_name}.details"
-        )
-        parameter_value_node_details: ParameterNode = (
-            get_parameter_value_and_validate_return_type(
-                domain=domain,
-                parameter_reference=fully_qualified_parameter_name_details,
-                expected_return_type=None,
-                parameters={
-                    domain.id: parameter_container,
-                },
-            )
-        )
-
-        unique_parameter_values: Set[
-            Any
-        ] = _get_unique_values_from_nested_collection_of_sets(
-            parameter_value_node.value
-        )
-
         return (
-            unique_parameter_values,
-            parameter_value_node_details,
+            _get_unique_values_from_nested_collection_of_sets(
+                collection=parameter_value_node.value
+            ),
+            parameter_value_node.details,
         )
 
 


Test patch:
diff --git a/tests/rule_based_profiler/parameter_builder/test_value_set_multi_batch_parameter_builder.py b/tests/rule_based_profiler/parameter_builder/test_value_set_multi_batch_parameter_builder.py
--- a/tests/rule_based_profiler/parameter_builder/test_value_set_multi_batch_parameter_builder.py
+++ b/tests/rule_based_profiler/parameter_builder/test_value_set_multi_batch_parameter_builder.py
@@ -1,4 +1,4 @@
-from typing import Any, Collection, List, Optional, Set, cast
+from typing import Any, Collection, Dict, List, Optional, Set, cast
 
 import pytest
 
@@ -69,9 +69,15 @@ def test_value_set_multi_batch_parameter_builder_alice_single_batch_numeric(
 
     assert parameter_container.parameter_nodes is None
 
+    parameters: Dict[str, ParameterContainer] = {
+        domain.id: parameter_container,
+    }
+    variables: Optional[ParameterContainer] = None
     value_set_multi_batch_parameter_builder.build_parameters(
         parameter_container=parameter_container,
         domain=domain,
+        variables=variables,
+        parameters=parameters,
     )
 
     assert (
@@ -98,7 +104,8 @@ def test_value_set_multi_batch_parameter_builder_alice_single_batch_numeric(
         domain=domain,
         parameter_reference=fully_qualified_parameter_name_for_value,
         expected_return_type=None,
-        parameters={domain.id: parameter_container},
+        variables=variables,
+        parameters=parameters,
     )
 
     assert sorted(actual_parameter_value.value) == expected_parameter_value["value"]
@@ -139,9 +146,15 @@ def test_value_set_multi_batch_parameter_builder_alice_single_batch_string(
 
     assert parameter_container.parameter_nodes is None
 
+    parameters: Dict[str, ParameterContainer] = {
+        domain.id: parameter_container,
+    }
+    variables: Optional[ParameterContainer] = None
     value_set_multi_batch_parameter_builder.build_parameters(
         parameter_container=parameter_container,
         domain=domain,
+        variables=variables,
+        parameters=parameters,
     )
 
     assert (
@@ -170,7 +183,8 @@ def test_value_set_multi_batch_parameter_builder_alice_single_batch_string(
         domain=domain,
         parameter_reference=fully_qualified_parameter_name_for_value,
         expected_return_type=None,
-        parameters={domain.id: parameter_container},
+        variables=variables,
+        parameters=parameters,
     )
 
     assert sorted(actual_parameter_value.value) == expected_parameter_value["value"]
@@ -209,9 +223,15 @@ def test_value_set_multi_batch_parameter_builder_bobby_numeric(
 
     assert parameter_container.parameter_nodes is None
 
+    parameters: Dict[str, ParameterContainer] = {
+        domain.id: parameter_container,
+    }
+    variables: Optional[ParameterContainer] = None
     value_set_multi_batch_parameter_builder.build_parameters(
         parameter_container=parameter_container,
         domain=domain,
+        variables=variables,
+        parameters=parameters,
     )
 
     assert (
@@ -240,7 +260,8 @@ def test_value_set_multi_batch_parameter_builder_bobby_numeric(
         domain=domain,
         parameter_reference=fully_qualified_parameter_name_for_value,
         expected_return_type=None,
-        parameters={domain.id: parameter_container},
+        variables=variables,
+        parameters=parameters,
     )
 
     assert sorted(actual_parameter_value.value) == expected_parameter_value["value"]
@@ -279,9 +300,15 @@ def test_value_set_multi_batch_parameter_builder_bobby_string(
 
     assert parameter_container.parameter_nodes is None
 
+    parameters: Dict[str, ParameterContainer] = {
+        domain.id: parameter_container,
+    }
+    variables: Optional[ParameterContainer] = None
     value_set_multi_batch_parameter_builder.build_parameters(
         parameter_container=parameter_container,
         domain=domain,
+        variables=variables,
+        parameters=parameters,
     )
 
     assert (
@@ -310,7 +337,8 @@ def test_value_set_multi_batch_parameter_builder_bobby_string(
         domain=domain,
         parameter_reference=fully_qualified_parameter_name_for_value,
         expected_return_type=None,
-        parameters={domain.id: parameter_container},
+        variables=variables,
+        parameters=parameters,
     )
 
     assert sorted(actual_parameter_value.value) == expected_parameter_value["value"]