Skip to content

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!

@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