You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: This change should not be implemented before #5734 is merged, because there is a high chance of conflicts.
We should use isort to address import sorting and grouping:
Fix it for all existing code.
Automate it for new code.
Check it for new code, in case someone accidentally skips the automation.
Fixing existing code should be a matter of running isort . on the root folder and committing all changes.
Automation should be handled through pre-commit. Chances are will provide pre-commit support for black, so here it would be a matter of extending that to include isort:
Hello @Gallaecio would it be alright if I give this issue a shot? I'm new to contributing to open source so apologize if I have questions but I'd be happy to help.
WARNING: This change should not be implemented before #5734 is merged, because there is a high chance of conflicts.
We should use isort to address import sorting and grouping:
Fixing existing code should be a matter of running
isort .
on the root folder and committing all changes.Automation should be handled through pre-commit. Chances are will provide pre-commit support for black, so here it would be a matter of extending that to include isort:
https://github.com/scrapy-plugins/scrapy-zyte-api/blob/016ef98092d1795b317c44c11326eefa58215f0d/.pre-commit-config.yaml#L2-L5
It also seems like we may need an
.isort.cfg
file for compatibility with black:https://github.com/scrapy-plugins/scrapy-zyte-api/blob/016ef98092d1795b317c44c11326eefa58215f0d/.isort.cfg
Finally, we need to check on a CI job that isort has been indeed used for all new changes. First we should add an entry to tox.ini:
Then, we can add a job to .github/workflows/checks.yml in line with the existing ones, i.e.:
The text was updated successfully, but these errors were encountered: