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/data_assistant/onboarding_data_assistant.py b/great_expectations/rule_based_profiler/data_assistant/onboarding_data_assistant.py
--- a/great_expectations/rule_based_profiler/data_assistant/onboarding_data_assistant.py
+++ b/great_expectations/rule_based_profiler/data_assistant/onboarding_data_assistant.py
@@ -195,10 +195,10 @@ def _build_table_rule() -> Rule:
             evaluation_parameter_builder_configs=None,
         )
 
-        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
-
         # Step-4: Pass "validation" "ParameterBuilderConfig" objects to every "DefaultExpectationConfigurationBuilder", responsible for emitting "ExpectationConfiguration" (with specified "expectation_type").
 
+        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
+
         validation_parameter_builder_configs = [
             ParameterBuilderConfig(
                 **table_row_count_range_parameter_builder_for_validations.to_json_dict(),
@@ -825,6 +825,8 @@ def _build_text_columns_rule() -> Rule:
 
         # Step-4: Pass "validation" "ParameterBuilderConfig" objects to every "DefaultExpectationConfigurationBuilder", responsible for emitting "ExpectationConfiguration" (with specified "expectation_type").
 
+        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
+
         validation_parameter_builder_configs = [
             ParameterBuilderConfig(
                 **column_min_length_range_parameter_builder_for_validations.to_json_dict(),
@@ -981,10 +983,10 @@ def _build_categorical_columns_rule() -> Rule:
             metric_value_kwargs=None,
         )
 
-        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
-
         # Step-4: Pass "validation" "ParameterBuilderConfig" objects to every "DefaultExpectationConfigurationBuilder", responsible for emitting "ExpectationConfiguration" (with specified "expectation_type").
 
+        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
+
         validation_parameter_builder_configs = [
             ParameterBuilderConfig(
                 **value_set_multi_batch_parameter_builder_for_validations.to_json_dict(),
diff --git a/great_expectations/rule_based_profiler/data_assistant/volume_data_assistant.py b/great_expectations/rule_based_profiler/data_assistant/volume_data_assistant.py
--- a/great_expectations/rule_based_profiler/data_assistant/volume_data_assistant.py
+++ b/great_expectations/rule_based_profiler/data_assistant/volume_data_assistant.py
@@ -111,9 +111,7 @@ def _build_table_rule() -> Rule:
 
         # Step-4: Pass "validation" "ParameterBuilderConfig" objects to every "DefaultExpectationConfigurationBuilder", responsible for emitting "ExpectationConfiguration" (with specified "expectation_type").
 
-        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
-
-        validation_parameter_builder_configs = [
+        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]] = [
             ParameterBuilderConfig(
                 **table_row_count_range_parameter_builder_for_validations.to_json_dict(),
             ),
@@ -203,11 +201,9 @@ def _build_categorical_columns_rule() -> Rule:
             evaluation_parameter_builder_configs=evaluation_parameter_builder_configs,
         )
 
-        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]]
-
         # Step-4: Pass "validation" "ParameterBuilderConfig" objects to every "DefaultExpectationConfigurationBuilder", responsible for emitting "ExpectationConfiguration" (with specified "expectation_type").
 
-        validation_parameter_builder_configs = [
+        validation_parameter_builder_configs: Optional[List[ParameterBuilderConfig]] = [
             ParameterBuilderConfig(
                 **column_distinct_values_count_range_parameter_builder_for_validations.to_json_dict(),
             ),


Test patch: