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

chore: Clean up imports #27302

Merged
merged 9 commits into from
Sep 2, 2021
Merged

chore: Clean up imports #27302

merged 9 commits into from
Sep 2, 2021

Conversation

ChillarAnand
Copy link
Contributor

@ChillarAnand ChillarAnand commented Sep 1, 2021

Used isort/pycln to clean up the imports & added import checks to CI.

@coveralls
Copy link

coveralls commented Sep 1, 2021

Coverage Status

Coverage decreased (-0.1%) to 51.492% when pulling fe53fdb on ChillarAnand:imports into a158b82 on frappe:develop.

@ankush
Copy link
Member

ankush commented Sep 2, 2021

@gavindsouza @surajshetty3416 we are going ahead with sorted imports using isort. The config that will be used is compatible with black style, so when/if we do add black it will work just fine.

This will likely mess up the history for import lines but I guess it's a reasonable compromise. We can add the final commit in .git-blame-ignore-revs but I doubt its efficacy when lots of lines are moved around.

Config file: https://github.com/frappe/erpnext/blob/fe53fdb750a5d70e9e3698ec18b11dd8e88968e3/pyproject.toml

@ChillarAnand ChillarAnand marked this pull request as ready for review September 2, 2021 07:01
@ankush ankush added squash Meant to tell reviewers that this PR should be squashed into a single commit while merging. manual-porting-required labels Sep 2, 2021
@ankush ankush merged commit 915b343 into frappe:develop Sep 2, 2021
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
* chore: Added isort to pre-commit config

* chore: Sort imports with isort

* chore: Clean up imports with pycln

* chore: Sort imports with isort

* chore: Fix import issues

* chore: Clean up sider issues

* chore: Remove import errors from flake8 ignore list

* chore: Clean up lint issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manual-porting-required squash Meant to tell reviewers that this PR should be squashed into a single commit while merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants