From cd3e8f95a018b64367e52a20ded6bce7d28a1bfa Mon Sep 17 00:00:00 2001
From: Christian Clauss <cclauss@me.com>
Date: Mon, 6 Jul 2020 05:18:18 +0200
Subject: [PATCH] isort --profile black --recursive . (#2170)

* isort --profile black --recursive .

* Update codespell.yml

* typo: vertices

* typo: Explanation

* typo: Explanation

* Fix typos
---
 .github/workflows/autoblack.yml             | 3 ++-
 .github/workflows/codespell.yml             | 4 ++--
 dynamic_programming/max_non_adjacent_sum.py | 2 +-
 dynamic_programming/minimum_cost_path.py    | 2 +-
 graphs/connected_components.py              | 2 +-
 machine_learning/k_means_clust.py           | 6 +++---
 6 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/autoblack.yml b/.github/workflows/autoblack.yml
index 44249f787..25a04f276 100644
--- a/.github/workflows/autoblack.yml
+++ b/.github/workflows/autoblack.yml
@@ -11,12 +11,13 @@ jobs:
     steps:
       - uses: actions/checkout@v1  # Use v1, NOT v2
       - uses: actions/setup-python@v2
-      - run: pip install black
+      - run: pip install black isort
       - run: black --check .
       - name: If needed, commit black changes to a new pull request
         if: failure()
         run: |
           black .
+          isort --profile black --recursive .
           git config --global user.name github-actions
           git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'          
           git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 30f2f34b4..3479b0218 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -13,5 +13,5 @@ jobs:
           SKIP="./.*,./other/dictionary.txt,./other/words,./project_euler/problem_22/p022_names.txt"
           codespell -L ans,fo,hist,iff,secant,tim --skip=$SKIP --quiet-level=2
       - name: Codespell comment
-          if: ${{ failure() }}
-          uses: plettich/python_codespell_action@master
+        if: ${{ failure() }}
+        uses: plettich/python_codespell_action@master
diff --git a/dynamic_programming/max_non_adjacent_sum.py b/dynamic_programming/max_non_adjacent_sum.py
index b9f99a226..15dd8ce66 100644
--- a/dynamic_programming/max_non_adjacent_sum.py
+++ b/dynamic_programming/max_non_adjacent_sum.py
@@ -1,4 +1,4 @@
-# Video Explaination: https://www.youtube.com/watch?v=6w60Zi1NtL8&feature=emb_logo
+# Video Explanation: https://www.youtube.com/watch?v=6w60Zi1NtL8&feature=emb_logo
 
 from typing import List
 
diff --git a/dynamic_programming/minimum_cost_path.py b/dynamic_programming/minimum_cost_path.py
index a8d424eb2..09295a4fa 100644
--- a/dynamic_programming/minimum_cost_path.py
+++ b/dynamic_programming/minimum_cost_path.py
@@ -1,4 +1,4 @@
-# Youtube Explaination: https://www.youtube.com/watch?v=lBRtnuxg-gU
+# Youtube Explanation: https://www.youtube.com/watch?v=lBRtnuxg-gU
 
 from typing import List
 
diff --git a/graphs/connected_components.py b/graphs/connected_components.py
index 6bcc160a9..4af7803d7 100644
--- a/graphs/connected_components.py
+++ b/graphs/connected_components.py
@@ -12,7 +12,7 @@ test_graph_2 = {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}
 
 def dfs(graph: dict, vert: int, visited: list) -> list:
     """
-    Use depth first search to find all vertexes
+    Use depth first search to find all vertices
     being in the same component as initial vertex
     >>> dfs(test_graph_1, 0, 5 * [False])
     [0, 1, 3, 2]
diff --git a/machine_learning/k_means_clust.py b/machine_learning/k_means_clust.py
index d5fa31135..9f6c65f58 100644
--- a/machine_learning/k_means_clust.py
+++ b/machine_learning/k_means_clust.py
@@ -250,7 +250,7 @@ def ReportGenerator(
     df["dummy"] = 1
     numeric_cols = df.select_dtypes(np.number).columns
     report = (
-        df.groupby(["Cluster"])[  # constract report dataframe
+        df.groupby(["Cluster"])[  # construct report dataframe
             numeric_cols
         ]  # group by cluster number
         .agg(
@@ -289,14 +289,14 @@ def ReportGenerator(
 
     clustersize = report[
         (report["Features"] == "dummy") & (report["Type"] == "count")
-    ]  # caclulating size of cluster(count of clientID's)
+    ]  # calculate the size of cluster(count of clientID's)
     clustersize.Type = (
         "ClusterSize"  # rename created cluster df to match report column names
     )
     clustersize.Features = "# of Customers"
     clusterproportion = pd.DataFrame(
         clustersize.iloc[:, 2:].values
-        / clustersize.iloc[:, 2:].values.sum()  # caclulating proportion of cluster
+        / clustersize.iloc[:, 2:].values.sum()  # calculating the proportion of cluster
     )
     clusterproportion[
         "Type"