ethereum / py-evm

A Python implementation of the Ethereum Virtual Machine
https://py-evm.readthedocs.io/en/latest/
MIT License
2.27k stars 656 forks source link

[1/3] Added isort to setup, makefile and tox #2101

Closed prathmeshranaut closed 1 year ago

prathmeshranaut commented 1 year ago

What was wrong?

Imports are not sorted.

Related to Issue https://github.com/ethereum/py-evm/issues/2094

How was it fixed?

Added isort, a tool to sort imports, in the linting process.

Adding lint setup + linting files would be a large PR to review. I've decided to split it up into two parts.

flowchart LR
    pr1[Added isort to setup, makefile and tox - This PR] --> pr2[Linted file with isort in eth and tests directory]
    pr2 --> pr3[Add isort check to tox]

In this PR, I've added isort and related commands to setup.py, Makefile and tox. In the follow up PR, I will be running make lint-roll. It will be easier for repo maintainers to checksum the changes and review the lint changes.

Let me know if I missed anything in the contribution process.

Todo:

Cute Animal Picture

white-rabbit-24093391

pacrob commented 1 year ago

The CI failures are affecting a bunch of our libraries, not your fault. We're looking into it.

pacrob commented 1 year ago

Hey @prathmeshranaut ! Thanks for all the help. I like how you've broken these up. To keep it consistent with our other libraries, I'd ask that you take a look at the template. We have our isort config in the tox.ini rather than a separate config file.

Otherwise, I'd like to get a separate PR in to make the CI changes, then you can rebase on that. Just so different concerns are mushed together here. I can take care of that first thing tomorrow if you don't get to it.

prathmeshranaut commented 1 year ago

@pacrob Moved the isort config to tox.ini. And rebased the CI changes with master.

pacrob commented 1 year ago

Looks good, @prathmeshranaut , thanks!