Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

Enforce Import Ordering (Isort) #1143

Merged
merged 5 commits into from Jul 15, 2021
Merged

Enforce Import Ordering (Isort) #1143

merged 5 commits into from Jul 15, 2021

Conversation

Vijay-P
Copy link
Contributor

@Vijay-P Vijay-P commented Jul 13, 2021

What this PR does / why we need it:
This PR utilizes isort to enforce import ordering across all modules that follows python best practices.

  • Added isort configuration file
  • changed make lint shell script to check import ordering
  • Ran isort on all modules
  • added isort commit to .git-blame-ignore-revs
  • Added pylint ignore comments to lines that could not be fixed
  • Fix circular import in anchore_engine/subsys/object_store/manager.py

Which issue this PR fixes (optional, in fixes #<issue number>)(, fixes #<issue_number, ...) format, will close the issue when PR is merged: fixes #:

Special notes:

@Vijay-P Vijay-P self-assigned this Jul 13, 2021
Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
@Vijay-P Vijay-P force-pushed the isort branch 2 times, most recently from ad9b7c6 to ece4430 Compare July 13, 2021 17:37
Signed-off-by: Vijay Pillai <vijay.pillai@anchore.com>
@Vijay-P Vijay-P marked this pull request as ready for review July 13, 2021 19:20
Copy link
Contributor

@Toure Toure left a comment

Choose a reason for hiding this comment

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

It looks good, a great clean-up. Just have to run some test tomorrow and I think it should be good to go.

@Toure
Copy link
Contributor

Toure commented Jul 14, 2021

The following test looks good.

  1. Deployment
  2. Image add
  3. listing images
  4. Vuln listing for images
  5. Feeds sync'd (non-vunldb)
  6. removing an image

@dspalmer99
Copy link
Contributor

@Vijay-P Is there a way (I am assuming there is) to add an isort plugin to pycharm (and vscode) to run automatically on every save? If so, can you add it to the README?

@dspalmer99
Copy link
Contributor

The engineering repo might be a better place for it, but it should be documented somewhere.
Otherwise this LGTM

@Vijay-P
Copy link
Contributor Author

Vijay-P commented Jul 15, 2021

@Vijay-P Is there a way (I am assuming there is) to add an isort plugin to pycharm (and vscode) to run automatically on every save? If so, can you add it to the README?

yes, absolutely

@Vijay-P Vijay-P merged commit 7694042 into master Jul 15, 2021
@Vijay-P
Copy link
Contributor Author

Vijay-P commented Jul 16, 2021

The engineering repo might be a better place for it, but it should be documented somewhere.
Otherwise this LGTM

https://github.com/anchore/engineering/pull/21

@Vijay-P Vijay-P deleted the isort branch August 4, 2021 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants