Skip to content
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

Added isort, ran isort on all files #1351

Merged
merged 8 commits into from
Jun 15, 2020

Conversation

akash-suresh
Copy link
Contributor

Resolves #1326

@drvinceknight I have added an isort config, and run isort over all the files.

Let me know if there are any modifications needed in the .isort.cfg file.

@drvinceknight
Copy link
Member

The CI has failed with the following traceback:

************* Module axelrod.strategies._strategies
29
axelrod/strategies/_strategies.py:81:0: W0611: Unused Cycler imported from cycler (unused-import)
30
axelrod/strategies/_strategies.py:81:0: W0611: Unused EvolvableCycler imported from cycler (unused-import)
31
axelrod/strategies/_strategies.py:118:0: W0611: Unused Gambler imported from gambler (unused-import)
32
axelrod/strategies/_strategies.py:153:0: W0611: Unused HMMPlayer imported from hmm (unused-import)
33
axelrod/strategies/_strategies.py:166:0: W0611: Unused LookerUp imported from lookerup (unused-import)

Let me know if you'd like me to take a closer look and figure out what's going on.

@akash-suresh
Copy link
Contributor Author

@drvinceknight I have fixed the issues. 😄

Copy link
Member

@gaffney2010 gaffney2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice change!

axelrod/strategies/__init__.py Outdated Show resolved Hide resolved
@drvinceknight
Copy link
Member

This is great!

It would be nice to add a check to the CI so that imports don't get "unsorted" in the future.

In https://github.com/Axelrod-Python/Axelrod/blob/master/.github/workflows/config.yml could you add:

    - name: Check imports are sorted
      run: |
        python -m pip install isort
        python -m isort --check-only

@drvinceknight
Copy link
Member

Note that when/if we get to #1312 it's possible that the isort and black checks contradict each other (I mentioned this at #1326) but we'll cross that bridge if/when we need to and for now it would be good to have a check for isort 👍

@akash-suresh
Copy link
Contributor Author

This is great!

It would be nice to add a check to the CI so that imports don't get "unsorted" in the future.

In https://github.com/Axelrod-Python/Axelrod/blob/master/.github/workflows/config.yml could you add:

    - name: Check imports are sorted
      run: |
        python -m pip install isort
        python -m isort --check-only

Done! 😄

@drvinceknight
Copy link
Member

Fantastic, thanks for the contribution @akash-suresh 👍

@drvinceknight drvinceknight merged commit 0739d39 into Axelrod-Python:master Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run isort utility on all files
4 participants