Repository: great-expectations/great_expectations
Pull request #6907 (2023-01-24 01:52:33)

[MAINTENANCE] replace `isort` with `ruff` sorting rules
### Changes proposed in this pull request:

- [x] - remove `isort` dependencies
- [x] - remove `isort` pre-commit hook
- [x] - update documentation
- [ ] - ~ruff pre-commit hook should run on full code-base (at least all of `great_expecatations/`)~
  - [ ] - ~for this we might want to wait until all of `great_expectations` is being linted (lint `great_expecations/dataset`)~
- ~update `expectation_diagnostics.py` to use `ruff` sorting~ - [see comment](https://github.com/great-expectations/great_expectations/pull/6907#discussion_r1084775270)
- [x] remove expectation_diagnostics `_check_linting` method
- [x] - `contrib/cli/great_expectations_contrib/commands.py` to use `ruff` sorting

### Definition of Done
Please delete options that are not relevant.

- [x] My code follows the Great Expectations [style guide](https://docs.greatexpectations.io/docs/contributing/style_guides/code_style)
- [x] I have performed a [self-review](https://docs.greatexpectations.io/docs/contributing/contributing_checklist) of my own code
- [x] I have made corresponding changes to the documentation

Follow-up to https://github.com/great-expectations/great_expectations/pull/6888


netlify[bot]: ### <span aria-hidden="true">👷</span> Deploy Preview for *niobium-lead-7998* processing.


|  Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 4888d555bc7ffc3060106c6359b13c73ae79d902 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/sites/niobium-lead-7998/deploys/63cf39e3abd26e0008995627 |
codesee-maps[bot]: <details>
<summary><b>👇 <a href="https://app.codesee.io/r/reviews?pr=6907&src=https%3A%2F%2Fgithub.com%2Fgreat-expectations%2Fgreat_expectations">Click on the image</a> for a new way to code review</b>
</summary>

  - Make big changes easier — review code in small groups of related files
  - Know where to start — see the whole change at a glance
  - Take a code tour — explore the change with an interactive tour
  - Make comments and review — all fully sync’ed with github

    [Try it now!](https://app.codesee.io/r/reviews?pr=6907&src=https%3A%2F%2Fgithub.com%2Fgreat-expectations%2Fgreat_expectations)
</details>

[![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/great-expectations/great_expectations/6907/9ebb6633/8164863bd14374a9e278c308b3e19021ada9cdfc.svg)](https://app.codesee.io/r/reviews?pr=6907&src=https%3A%2F%2Fgithub.com%2Fgreat-expectations%2Fgreat_expectations)

#### Legend
![CodeSee Map Legend](https://app.codesee.io/Legend_v2.png)
Kilo59: After seeing all the test failures from `ExpectationsDiagnostic`...
I think it might actually be simpler to keep `_check_linting()` but replace it with a subprocess call to `ruff` 🤔  
austiezr: How should we move forward here? From what I can see, there are 3 explicit failures linked to this change, all just needing output from `_check_linting` removed -- I don't have a particularly strong feeling either way re: keeping the linting check or not.
Kilo59: @austiezr I updated the 3 test failures to stop expecting `_check_linting`.
Merging.

Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index af28d1b08..9cbe0fb25 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -12,10 +12,6 @@ repos:
         exclude: docs/.*|tests/.*.fixture
       - id: requirements-txt-fixer
         exclude: docs/.*
-  - repo: https://github.com/timothycrosley/isort
-    rev: 5.10.1
-    hooks:
-      - id: isort
   - repo: https://github.com/psf/black
     rev: 22.3.0
     hooks:
diff --git a/azure-pipelines-contrib.yml b/azure-pipelines-contrib.yml
index e538f8a73..923a1c6ff 100644
--- a/azure-pipelines-contrib.yml
+++ b/azure-pipelines-contrib.yml
@@ -50,7 +50,7 @@ stages:
             displayName: 'Use Python $(python.version)'
 
           - script: |
-              pip install $(grep -E '^(black|invoke|isort|ruff)' reqs/requirements-dev-contrib.txt)
+              pip install $(grep -E '^(black|invoke|ruff)' reqs/requirements-dev-contrib.txt)
               EXIT_STATUS=0
               invoke fmt --check || EXIT_STATUS=$?
               invoke lint || EXIT_STATUS=$?
diff --git a/azure-pipelines-dev.yml b/azure-pipelines-dev.yml
index 79f7bb2c0..e5ca25eb1 100644
--- a/azure-pipelines-dev.yml
+++ b/azure-pipelines-dev.yml
@@ -103,7 +103,7 @@ stages:
             displayName: 'Use Python 3.7'
 
           - script: |
-              pip install $(grep -E '^(black|invoke|isort|ruff)' reqs/requirements-dev-contrib.txt)
+              pip install $(grep -E '^(black|invoke|ruff)' reqs/requirements-dev-contrib.txt)
               EXIT_STATUS=0
               invoke fmt --check || EXIT_STATUS=$?
               invoke lint || EXIT_STATUS=$?
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 0ba5c5594..ef4b1b304 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -72,7 +72,7 @@ stages:
             displayName: 'Use Python 3.7'
 
           - script: |
-              pip install $(grep -E '^(black|invoke|isort|ruff)' reqs/requirements-dev-contrib.txt)
+              pip install $(grep -E '^(black|invoke|ruff)' reqs/requirements-dev-contrib.txt)
               EXIT_STATUS=0
               invoke fmt --check || EXIT_STATUS=$?
               invoke lint || EXIT_STATUS=$?
diff --git a/contrib/cli/great_expectations_contrib/commands.py b/contrib/cli/great_expectations_contrib/commands.py
index 04240f8f0..f35647c43 100644
--- a/contrib/cli/great_expectations_contrib/commands.py
+++ b/contrib/cli/great_expectations_contrib/commands.py
@@ -61,10 +61,11 @@ def perform_check(suppress_output: bool) -> bool:
             "black --check .",
             "Please ensure that your files are linted properly with `black .`",
         ),
+        # TODO: update this (or don't)
         Command(
-            "isort",
-            "isort --profile black --check .",
-            "Please ensure that your imports are sorted properly with `isort --profile black .`",
+            "ruff",
+            "ruff --select I --fix .",
+            "Please ensure that your imports are sorted properly with `ruff --select I --fix .`",
         ),
         Command(
             "pytest",
diff --git a/contrib/cli/requirements.txt b/contrib/cli/requirements.txt
index fd3a3510c..5b58bc766 100644
--- a/contrib/cli/requirements.txt
+++ b/contrib/cli/requirements.txt
@@ -1,7 +1,6 @@
 black==22.3.0        # Linting / code style
 Click>=7.1.2         # CLI tooling
 cookiecutter==1.7.3  # Project templating
-isort==5.11.4        # Linting / code style
 mypy==0.991          # Type checker
 pydantic>=1.0,<2.0    # Needed for mypy plugin
 pytest>=5.3.5        # Test framework
diff --git a/docs/contributing/style_guides/code_style.md b/docs/contributing/style_guides/code_style.md
index a67e3597f..c3229f977 100644
--- a/docs/contributing/style_guides/code_style.md
+++ b/docs/contributing/style_guides/code_style.md
@@ -54,13 +54,12 @@ Options:
 
 ### Linting
 
-Our CI system will check using `black`, `isort`, and `ruff`.
+Our CI system will check using `black`, and `ruff`.
 
 If you have already committed files but are seeing errors during the continuous integration tests, you can run tests manually:
 
 ```console
 black <PATH/TO/YOUR/CHANGES>
-isort <PATH/TO/YOUR/CHANGES> --check-only --skip docs
 ruff <PATH/TO/YOUR/CHANGES> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_aggregate_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_aggregate_expectations.md
index b664180c9..96537d515 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_aggregate_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_aggregate_expectations.md
@@ -281,13 +281,12 @@ Completeness checklist for ExpectColumnMaxToBeBetweenCustom:
 
 ### 8. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_map_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_map_expectations.md
index a28079852..3f72b7b58 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_map_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_map_expectations.md
@@ -260,13 +260,12 @@ Completeness checklist for ExpectColumnValuesToEqualThree:
 
 ### 7. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_pair_map_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_pair_map_expectations.md
index ca4684e31..362d5be50 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_pair_map_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_pair_map_expectations.md
@@ -257,13 +257,12 @@ Completeness checklist for ExpectColumnPairValuesToHaveADifferenceOfThree:
 
 ### 7. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_multicolumn_map_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_multicolumn_map_expectations.md
index 34fd0182a..12191c08e 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_multicolumn_map_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_multicolumn_map_expectations.md
@@ -257,13 +257,12 @@ Completeness checklist for ExpectMulticolumnValuesToBeMultiplesOfThree:
 
 ### 7. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_query_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_query_expectations.md
index ffcbe8e06..87ba702a6 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_query_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_query_expectations.md
@@ -308,13 +308,12 @@ Completeness checklist for ExpectQueriedTableRowCountToBe:
 
 ### 8. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
@@ -610,13 +609,12 @@ Completeness checklist for ExpectQueriedColumnValueFrequencyToMeetThreshold:
 
 ### 8. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_regex_based_column_map_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_regex_based_column_map_expectations.md
index a07798efd..83816c359 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_regex_based_column_map_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_regex_based_column_map_expectations.md
@@ -238,13 +238,12 @@ Completeness checklist for ExpectColumnValuesToOnlyContainVowels:
 
 ### 7. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_set_based_column_map_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_set_based_column_map_expectations.md
index 332e32e1f..e03c3ba92 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_set_based_column_map_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_set_based_column_map_expectations.md
@@ -237,13 +237,12 @@ Completeness checklist for ExpectColumnValuesToBeInSolfegeScaleSet:
 
 ### 7. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_table_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_table_expectations.md
index 380bfe07f..7c48a8fd7 100644
--- a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_table_expectations.md
+++ b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_table_expectations.md
@@ -285,13 +285,12 @@ Completeness checklist for ExpectTableColumnsToBeUnique:
 
 ### 8. Linting
 
-Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, `isort`, and `ruff`.
+Finally, we need to lint our now-functioning Custom Expectation. Our CI system will test your code using `black`, and `ruff`.
 
 If you've [set up your dev environment](../../../contributing/contributing_setup.md) as recommended in the Prerequisites, these libraries will already be available to you, and can be invoked from your command line to automatically lint your code:
 
 ```console
 black <PATH/TO/YOUR/EXPECTATION.py>
-isort <PATH/TO/YOUR/EXPECTATION.py>
 ruff <PATH/TO/YOUR/EXPECTATION.py> --fix
 ```
 
diff --git a/great_expectations/core/expectation_diagnostics/expectation_diagnostics.py b/great_expectations/core/expectation_diagnostics/expectation_diagnostics.py
index 0370ca8cc..79c1152df 100644
--- a/great_expectations/core/expectation_diagnostics/expectation_diagnostics.py
+++ b/great_expectations/core/expectation_diagnostics/expectation_diagnostics.py
@@ -1,14 +1,11 @@
 from __future__ import annotations
 
 import inspect
-import os
 import re
 from collections import defaultdict
 from dataclasses import asdict, dataclass
 from typing import List, Sequence, Tuple, Union
 
-from typing_extensions import Final
-
 from great_expectations.core.expectation_configuration import ExpectationConfiguration
 from great_expectations.core.expectation_diagnostics.expectation_test_data_cases import (
     ExpectationTestDataCases,
@@ -28,22 +25,7 @@ from great_expectations.core.expectation_diagnostics.supporting_types import (
 )
 from great_expectations.core.util import convert_to_json_serializable
 from great_expectations.exceptions import InvalidExpectationConfigurationError
-from great_expectations.expectations.registry import get_expectation_impl
 from great_expectations.types import SerializableDictDot
-from great_expectations.util import camel_to_snake, lint_code
-
-BLACK_IMPORTED: Final[bool] = True
-ISORT_IMPORTED: Final[bool] = True
-
-try:
-    import black  # noqa: F401
-except ImportError:
-    BLACK_IMPORTED = False  # type: ignore[misc] # Final assignment
-
-try:
-    import isort
-except ImportError:
-    ISORT_IMPORTED = False  # type: ignore[misc] # Final assignment
 
 
 @dataclass(frozen=True)
@@ -454,115 +436,6 @@ class ExpectationDiagnostics(SerializableDictDot):
             passed=passed,
         )
 
-    @staticmethod
-    def _check_linting(expectation_instance) -> ExpectationDiagnosticCheckMessage:
-        """Check if linting checks pass for Expectation"""
-        sub_messages: List[ExpectationDiagnosticCheckMessageDict] = []
-        message: str = "Passes all linting checks"
-        passed: bool = False
-        black_ok: bool = False
-        isort_ok: bool = False
-        file_and_class_names_ok: bool = False
-        rx_expectation_instance_repr = re.compile(r"<.*\.([^\.]*) object at .*")
-
-        try:
-            expectation_camel_name = rx_expectation_instance_repr.match(  # type: ignore[union-attr] # could be None
-                repr(expectation_instance)
-            ).group(
-                1
-            )
-        except AttributeError:
-            sub_messages.append(
-                {
-                    "message": "Arg passed to _check_linting was not an instance of an Expectation, so cannot check linting",
-                    "passed": False,
-                }
-            )
-            return ExpectationDiagnosticCheckMessage(
-                message=message,
-                passed=passed,
-                sub_messages=sub_messages,
-            )
-
-        impl = get_expectation_impl(camel_to_snake(expectation_camel_name))
-        try:
-            source_file_path = inspect.getfile(impl)
-        except TypeError:
-            sub_messages.append(
-                {
-                    "message": "inspect.getfile(impl) raised a TypeError (impl is a built-in class)",
-                    "passed": False,
-                }
-            )
-            return ExpectationDiagnosticCheckMessage(
-                message=message,
-                passed=passed,
-                sub_messages=sub_messages,
-            )
-
-        snaked_impl_name = camel_to_snake(impl.__name__)
-        source_file_base_no_ext = os.path.basename(source_file_path).rsplit(".", 1)[0]
-        with open(source_file_path) as fp:
-            code = fp.read()
-
-        if snaked_impl_name != source_file_base_no_ext:
-            sub_messages.append(
-                {
-                    "message": f"The snake_case of {impl.__name__} ({snaked_impl_name}) does not match filename part ({source_file_base_no_ext})",
-                    "passed": False,
-                }
-            )
-        else:
-            file_and_class_names_ok = True
-
-        if not BLACK_IMPORTED:
-            sub_messages.append(
-                {
-                    "message": "Could not find 'black', so cannot check linting",
-                    "passed": False,
-                }
-            )
-
-        if not ISORT_IMPORTED:
-            sub_messages.append(
-                {
-                    "message": "Could not find 'isort', so cannot check linting",
-                    "passed": False,
-                }
-            )
-
-        if BLACK_IMPORTED and ISORT_IMPORTED:
-            blacked_code = lint_code(code)
-            if code != blacked_code:
-                sub_messages.append(
-                    {
-                        "message": "Your code would be reformatted with black",
-                        "passed": False,
-                    }
-                )
-            else:
-                black_ok = True
-            isort_ok = isort.check_code(
-                code,
-                **isort.profiles.black,  # type: ignore[arg-type]
-                ignore_whitespace=True,
-                known_local_folder=["great_expectations"],
-            )
-            if not isort_ok:
-                sub_messages.append(
-                    {
-                        "message": "Your code would be reformatted with isort",
-                        "passed": False,
-                    }
-                )
-
-        passed = black_ok and isort_ok and file_and_class_names_ok
-        return ExpectationDiagnosticCheckMessage(
-            message=message,
-            passed=passed,
-            sub_messages=sub_messages,
-        )
-
     @staticmethod
     def _check_full_test_suite(
         library_metadata: Union[
diff --git a/great_expectations/core/usage_statistics/package_dependencies.py b/great_expectations/core/usage_statistics/package_dependencies.py
index 0621daa9d..46e9a104d 100644
--- a/great_expectations/core/usage_statistics/package_dependencies.py
+++ b/great_expectations/core/usage_statistics/package_dependencies.py
@@ -81,7 +81,6 @@ class GXDependencies:
             "google-cloud-secret-manager",
             "google-cloud-storage",
             "invoke",
-            "isort",
             "mistune",
             "mock-alchemy",
             "moto",
@@ -124,7 +123,6 @@ class GXDependencies:
         "black",
         "ruff",
         "invoke",
-        "isort",
         "mypy",
         "pre-commit",
         "pytest-cov",
diff --git a/great_expectations/expectations/expectation.py b/great_expectations/expectations/expectation.py
index b89828c25..3ad213955 100644
--- a/great_expectations/expectations/expectation.py
+++ b/great_expectations/expectations/expectation.py
@@ -2206,8 +2206,6 @@ class Expectation(metaclass=MetaExpectation):
                 backend_test_result_counts
             )
         )
-        experimental_checks.append(ExpectationDiagnostics._check_linting(self))
-
         beta_checks.append(
             ExpectationDiagnostics._check_input_validation(self, examples)
         )
diff --git a/great_expectations/expectations/metrics/__init__.py b/great_expectations/expectations/metrics/__init__.py
index b004a608c..a5e5a8be0 100644
--- a/great_expectations/expectations/metrics/__init__.py
+++ b/great_expectations/expectations/metrics/__init__.py
@@ -2,11 +2,9 @@ from .meta_metric_provider import (  # isort:skip
     MetaMetricProvider,
     DeprecatedMetaMetricProvider,
 )
-from .column_aggregate_metric_provider import (
-    ColumnMetricProvider,  # This class name is being deprecated (use "ColumnAggregateMetricProvider" going forward).
-)
 from .column_aggregate_metric_provider import (
     ColumnAggregateMetricProvider,
+    ColumnMetricProvider,  # This class name is being deprecated (use "ColumnAggregateMetricProvider" going forward).
     column_aggregate_partial,
     column_aggregate_value,
 )
diff --git a/great_expectations/experimental/datasources/interfaces.py b/great_expectations/experimental/datasources/interfaces.py
index 1f08fcd8f..60095bd7c 100644
--- a/great_expectations/experimental/datasources/interfaces.py
+++ b/great_expectations/experimental/datasources/interfaces.py
@@ -19,9 +19,8 @@ from typing import (
 
 import pandas as pd
 import pydantic
-from pydantic import Field, StrictBool, StrictInt
+from pydantic import Field, StrictBool, StrictInt, root_validator, validate_arguments
 from pydantic import dataclasses as pydantic_dc
-from pydantic import root_validator, validate_arguments
 from typing_extensions import ClassVar, TypeAlias, TypeGuard
 
 import great_expectations.exceptions as ge_exceptions
diff --git a/great_expectations/rule_based_profiler/expectation_configuration_builder/default_expectation_configuration_builder.py b/great_expectations/rule_based_profiler/expectation_configuration_builder/default_expectation_configuration_builder.py
index 04cf977f4..68c6fb91f 100644
--- a/great_expectations/rule_based_profiler/expectation_configuration_builder/default_expectation_configuration_builder.py
+++ b/great_expectations/rule_based_profiler/expectation_configuration_builder/default_expectation_configuration_builder.py
@@ -2,9 +2,8 @@ from __future__ import annotations
 
 from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Optional, Set, Union
 
-from pyparsing import Combine
-from pyparsing import Optional as ppOptional
 from pyparsing import (
+    Combine,
     ParseException,
     ParseResults,
     Suppress,
@@ -16,6 +15,7 @@ from pyparsing import (
     oneOf,
     opAssoc,
 )
+from pyparsing import Optional as ppOptional
 
 import great_expectations.exceptions as gx_exceptions
 from great_expectations.core.domain import Domain
diff --git a/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py
index 84b1eb061..29743b471 100644
--- a/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py
+++ b/great_expectations/rule_based_profiler/parameter_builder/parameter_builder.py
@@ -35,13 +35,11 @@ from great_expectations.rule_based_profiler.builder import Builder
 from great_expectations.rule_based_profiler.config import ParameterBuilderConfig
 from great_expectations.rule_based_profiler.helpers.util import (
     build_metric_domain_kwargs,
+    get_parameter_value_and_validate_return_type,
 )
 from great_expectations.rule_based_profiler.helpers.util import (
     get_batch_ids as get_batch_ids_from_batch_list_or_batch_request,
 )
-from great_expectations.rule_based_profiler.helpers.util import (
-    get_parameter_value_and_validate_return_type,
-)
 from great_expectations.rule_based_profiler.helpers.util import (
     get_validator as get_validator_using_batch_list_or_batch_request,
 )
diff --git a/great_expectations/self_check/util.py b/great_expectations/self_check/util.py
index 1cca9222f..7ad9c491f 100644
--- a/great_expectations/self_check/util.py
+++ b/great_expectations/self_check/util.py
@@ -141,8 +141,8 @@ except (ImportError, KeyError):
 _BIGQUERY_MODULE_NAME = "sqlalchemy_bigquery"
 try:
     # noinspection PyPep8Naming
-    import sqlalchemy_bigquery as sqla_bigquery
     import sqlalchemy_bigquery as BigQueryDialect
+    import sqlalchemy_bigquery as sqla_bigquery
 
     sqlalchemy.dialects.registry.register("bigquery", _BIGQUERY_MODULE_NAME, "dialect")
     # noinspection PyTypeChecker
@@ -171,8 +171,8 @@ try:
         pass
 except ImportError:
     try:
-        import pybigquery.sqlalchemy_bigquery as sqla_bigquery
         import pybigquery.sqlalchemy_bigquery as BigQueryDialect
+        import pybigquery.sqlalchemy_bigquery as sqla_bigquery
 
         # deprecated-v0.14.7
         warnings.warn(
@@ -351,8 +351,8 @@ except (ImportError, KeyError):
     TRINO_TYPES = {}
 
 try:
-    import sqlalchemy_redshift.dialect as redshifttypes
     import sqlalchemy_redshift.dialect as redshiftDialect
+    import sqlalchemy_redshift.dialect as redshifttypes
 
     REDSHIFT_TYPES = {
         "BIGINT": redshifttypes.BIGINT,
diff --git a/pyproject.toml b/pyproject.toml
index 38daaff2b..592fd2acb 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -200,7 +200,7 @@ select = [
     # https://github.com/charliermarsh/ruff#pyupgrade-up
     "UP", # pyupgrade
     # https://github.com/charliermarsh/ruff#isort-i
-    # "I", # isort # TODO: replace isort usage with this
+    "I", # isort
 ]
 ignore = [
     # https://github.com/charliermarsh/ruff#pyflakes-f
diff --git a/reqs/requirements-dev-contrib.txt b/reqs/requirements-dev-contrib.txt
index 510dc1ffb..8ea752639 100644
--- a/reqs/requirements-dev-contrib.txt
+++ b/reqs/requirements-dev-contrib.txt
@@ -1,6 +1,5 @@
 black==22.3.0
 invoke>=2.0.0
-isort==5.10.1
 mypy==0.991
 pre-commit>=2.21.0
 ruff==0.0.238
diff --git a/tasks.py b/tasks.py
index 19720556b..5446f8473 100644
--- a/tasks.py
+++ b/tasks.py
@@ -64,14 +64,14 @@ def sort(
     path: str = ".",
     check: bool = False,
     exclude: str | None = None,
-    ruff: bool = False,
-    isort: bool = False,  # isort is the current default
+    ruff: bool = False,  # isort is the current default
+    isort: bool = False,
     pty: bool = True,
 ):
     """Sort module imports."""
     if ruff and isort:
         raise invoke.Exit("cannot use both `--ruff` and `--isort`", code=1)
-    if ruff:
+    if not isort:
         cmds = [
             "ruff",
             path,


Test patch:
diff --git a/tests/expectations/test_generate_diagnostic_checklist.py b/tests/expectations/test_generate_diagnostic_checklist.py
index 0e5a86379..1885cd932 100644
--- a/tests/expectations/test_generate_diagnostic_checklist.py
+++ b/tests/expectations/test_generate_diagnostic_checklist.py
@@ -41,8 +41,6 @@ Completeness checklist for ExpectColumnValuesToEqualThree__SecondIteration (EXPE
  ✔ Has at least one positive and negative example case, and all test cases pass
  ✔ Has core logic and passes tests on at least one Execution Engine
     ✔ All 3 tests for pandas are passing
-   Passes all linting checks
-      The snake_case of ExpectColumnValuesToEqualThree__SecondIteration (expect_column_values_to_equal_three___second_iteration) does not match filename part (expect_column_values_to_equal_three)
    Has basic input validation and type checking
       No validate_configuration method defined on subclass
  ✔ Has both statement Renderers: prescriptive and diagnostic
@@ -69,8 +67,6 @@ Completeness checklist for ExpectColumnValuesToEqualThree__ThirdIteration (EXPER
  ✔ Has at least one positive and negative example case, and all test cases pass
  ✔ Has core logic and passes tests on at least one Execution Engine
     ✔ All 3 tests for pandas are passing
-   Passes all linting checks
-      The snake_case of ExpectColumnValuesToEqualThree__ThirdIteration (expect_column_values_to_equal_three___third_iteration) does not match filename part (expect_column_values_to_equal_three)
    Has basic input validation and type checking
       No validate_configuration method defined on subclass
  ✔ Has both statement Renderers: prescriptive and diagnostic
diff --git a/tests/expectations/test_run_diagnostics.py b/tests/expectations/test_run_diagnostics.py
index f6054a3f3..a2d6340b9 100644
--- a/tests/expectations/test_run_diagnostics.py
+++ b/tests/expectations/test_run_diagnostics.py
@@ -192,12 +192,6 @@ def test_expectation_self_check():
                         }
                     ],
                 },
-                {
-                    "doc_url": None,
-                    "message": "Passes all linting checks",
-                    "passed": True,
-                    "sub_messages": [],
-                },
             ],
             "production": [
                 {