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/domain_builder/categorical_column_domain_builder.py b/great_expectations/rule_based_profiler/domain_builder/categorical_column_domain_builder.py
--- a/great_expectations/rule_based_profiler/domain_builder/categorical_column_domain_builder.py
+++ b/great_expectations/rule_based_profiler/domain_builder/categorical_column_domain_builder.py
@@ -111,7 +111,7 @@ def __init__(
         )
 
     @property
-    def limit_mode(self) -> CardinalityLimitMode:
+    def limit_mode(self) -> Union[AbsoluteCardinalityLimit, RelativeCardinalityLimit]:
         return self._limit_mode
 
     def cardinality_within_limit(self, metric_value: float) -> bool:
@@ -150,7 +150,6 @@ def _convert_to_cardinality_mode(
         max_unique_values: Optional[int] = None,
         max_proportion_unique: Optional[float] = None,
     ) -> Union[AbsoluteCardinalityLimit, RelativeCardinalityLimit]:
-
         self._validate_input_parameters(
             limit_mode=limit_mode,
             max_unique_values=max_unique_values,
diff --git a/great_expectations/rule_based_profiler/domain_builder/domain_builder.py b/great_expectations/rule_based_profiler/domain_builder/domain_builder.py
--- a/great_expectations/rule_based_profiler/domain_builder/domain_builder.py
+++ b/great_expectations/rule_based_profiler/domain_builder/domain_builder.py
@@ -97,7 +97,7 @@ def get_validator(
         variables: Optional[ParameterContainer] = None,
     ) -> Optional["Validator"]:  # noqa: F821
         return get_validator_using_batch_list_or_batch_request(
-            purpose="parameter_builder",
+            purpose="domain_builder",
             data_context=self.data_context,
             batch_list=self.batch_list,
             batch_request=self.batch_request,
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
@@ -43,7 +43,6 @@ def __init__(
         data_context: Optional["DataContext"] = None,  # noqa: F821
     ):
         """
-
         Args:
             name: the name of this parameter -- this is user-specified parameter name (from configuration);
             it is not the fully-qualified parameter name; a fully-qualified parameter name must start with "$parameter."
@@ -57,32 +56,16 @@ def __init__(
         super().__init__(
             name=name,
             metric_name="column.distinct_values",
+            metric_domain_kwargs=metric_domain_kwargs,
+            metric_value_kwargs=metric_value_kwargs,
+            enforce_numeric_metric=False,
+            replace_nan_with_zero=False,
+            reduce_scalar_metric=False,
             batch_list=batch_list,
             batch_request=batch_request,
             data_context=data_context,
-            reduce_scalar_metric=False,
-            enforce_numeric_metric=False,
         )
 
-        self._metric_domain_kwargs = metric_domain_kwargs
-        self._metric_value_kwargs = metric_value_kwargs
-
-    """
-    Full getter/setter accessors for needed properties are for configuring MetricMultiBatchParameterBuilder dynamically.
-    """
-
-    @property
-    def metric_domain_kwargs(self) -> Optional[Union[str, dict]]:
-        return self._metric_domain_kwargs
-
-    @property
-    def metric_value_kwargs(self) -> Optional[Union[str, dict]]:
-        return self._metric_value_kwargs
-
-    @metric_value_kwargs.setter
-    def metric_value_kwargs(self, value: Optional[Union[str, dict]]) -> None:
-        self._metric_value_kwargs = value
-
     def _build_parameters(
         self,
         parameter_container: ParameterContainer,


Test patch: