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
@@ -1,4 +1,4 @@
-from typing import Any, Dict, List, Optional
+from typing import TYPE_CHECKING, Any, Dict, List, Optional
 
 from great_expectations.rule_based_profiler.config import ParameterBuilderConfig
 from great_expectations.rule_based_profiler.data_assistant import DataAssistant
@@ -39,6 +39,9 @@
 from great_expectations.rule_based_profiler.rule import Rule
 from great_expectations.validator.validator import Validator
 
+if TYPE_CHECKING:
+    from great_expectations.rule_based_profiler.domain_builder import DomainBuilder
+
 
 class OnboardingDataAssistant(DataAssistant):
     """
@@ -183,7 +186,7 @@ def _build_table_rule() -> Rule:
         """
         # Step-1: Instantiate "TableDomainBuilder" object.
 
-        table_domain_builder = TableDomainBuilder(
+        table_domain_builder: DomainBuilder = TableDomainBuilder(
             data_context=None,
         )
 
@@ -298,7 +301,7 @@ def _build_numeric_columns_rule() -> Rule:
 
         # Step-1: Instantiate "ColumnDomainBuilder" for selecting numeric columns (but not "ID-type" columns).
 
-        numeric_column_type_domain_builder = ColumnDomainBuilder(
+        numeric_column_type_domain_builder: DomainBuilder = ColumnDomainBuilder(
             include_column_names=None,
             exclude_column_names=None,
             include_column_name_suffixes=None,
@@ -614,7 +617,7 @@ def _build_datetime_columns_rule() -> Rule:
 
         # Step-1: Instantiate "ColumnDomainBuilder" for selecting proper datetime columns (not "datetime-looking" text).
 
-        datetime_column_type_domain_builder = ColumnDomainBuilder(
+        datetime_column_type_domain_builder: DomainBuilder = ColumnDomainBuilder(
             include_column_names=None,
             exclude_column_names=None,
             include_column_name_suffixes=None,
@@ -770,7 +773,7 @@ def _build_text_columns_rule() -> Rule:
 
         # Step-1: Instantiate "ColumnDomainBuilder" for selecting proper text columns.
 
-        text_column_type_domain_builder = ColumnDomainBuilder(
+        text_column_type_domain_builder: DomainBuilder = ColumnDomainBuilder(
             include_column_names=None,
             exclude_column_names=None,
             include_column_name_suffixes=None,
@@ -919,7 +922,7 @@ def _build_categorical_columns_rule() -> Rule:
 
         # Step-1: Instantiate "CategoricalColumnDomainBuilder" for selecting columns containing "FEW" discrete values.
 
-        categorical_column_type_domain_builder: CategoricalColumnDomainBuilder = (
+        categorical_column_type_domain_builder: DomainBuilder = (
             CategoricalColumnDomainBuilder(
                 include_column_names=None,
                 exclude_column_names=None,
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
@@ -1,4 +1,4 @@
-from typing import Any, Dict, List, Optional
+from typing import TYPE_CHECKING, Any, Dict, List, Optional
 
 from great_expectations.rule_based_profiler.config import ParameterBuilderConfig
 from great_expectations.rule_based_profiler.data_assistant import DataAssistant
@@ -28,6 +28,9 @@
 from great_expectations.rule_based_profiler.rule import Rule
 from great_expectations.validator.validator import Validator
 
+if TYPE_CHECKING:
+    from great_expectations.rule_based_profiler.domain_builder import DomainBuilder
+
 
 class VolumeDataAssistant(DataAssistant):
     """
@@ -88,7 +91,7 @@ def _build_table_rule() -> Rule:
         """
         # Step-1: Instantiate "TableDomainBuilder" object.
 
-        table_domain_builder = TableDomainBuilder(
+        table_domain_builder: DomainBuilder = TableDomainBuilder(
             data_context=None,
         )
 
@@ -168,7 +171,7 @@ def _build_categorical_columns_rule() -> Rule:
         """
         # Step-1: Instantiate "CategoricalColumnDomainBuilder" for selecting columns containing "FEW" discrete values.
 
-        categorical_column_type_domain_builder: CategoricalColumnDomainBuilder = (
+        categorical_column_type_domain_builder: DomainBuilder = (
             CategoricalColumnDomainBuilder(
                 include_column_names=None,
                 exclude_column_names=None,


Test patch: