Skip to content

isort --profile black --recursive . #2170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/autoblack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion dynamic_programming/max_non_adjacent_sum.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion dynamic_programming/minimum_cost_path.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphs/connected_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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]
Expand Down
6 changes: 3 additions & 3 deletions machine_learning/k_means_clust.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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"
Expand Down