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

ConfigParser: Removed py2 support #4020

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

bskjois
Copy link
Contributor

@bskjois bskjois commented Oct 29, 2024

Signed-off-by: Kowshik Jois B S [email protected]

@xiaodwan
Copy link
Contributor

@bskjois Please fix the static checks issue. The changes look great to me.

@bskjois bskjois force-pushed the removePy2Support branch 3 times, most recently from 3f6351e to f4261ba Compare October 30, 2024 13:56
@bskjois
Copy link
Contributor Author

bskjois commented Oct 30, 2024

@xiaodwan I used "isort" command and executed against all 7 files. WIth that I faced static failures(Here it is: https://github.com/avocado-framework/avocado-vt/actions/runs/11593886597/job/32278881855?pr=4020)

So, I have corrected all the errors shown there. Also, I have sorted the imports accordingly. Still 1 check is failing. Please take a look. Even with the current failure, it is showing 6/7 files have Imports which are incorrectly sorted. But isort command itself is not showing anything for most of them. Also Imports are sorted and is clearly visible. Please take a review.

If in case required, I have allowed edits by maintainers too!

@bskjois bskjois force-pushed the removePy2Support branch 4 times, most recently from 03568b7 to 0a904bb Compare October 31, 2024 16:05
@bskjois
Copy link
Contributor Author

bskjois commented Oct 31, 2024

@xiaodwan @chloerh
Even after trying multiple (more than 15) times also I am unable to fix the static issue on few of the files. Whatever the way I try, it still says imports are not sorted/formatted.
Could you please help me out here?

@chloerh
Copy link
Contributor

chloerh commented Nov 1, 2024

Hi @bskjois
You could try isort --profile black . which would fix the import sorting errors.

@bskjois
Copy link
Contributor Author

bskjois commented Nov 1, 2024

Thank you @chloerh

I had tried that command earlier too! But it says "unrecognized arguments: --profile"

Even in isort commad's usage, I don't see profile. Looks like it has been removed or so. Could you please confirm.

kowshik:avocado-vt$ isort --profile black . usage: isort [-h] [-a ADD_IMPORTS] [-ac] [-af] [-b KNOWN_STANDARD_LIBRARY] [-c] [-ca] [-cs] [-d] [-df] [-ds] [-dt] [-e] [-f KNOWN_FUTURE_LIBRARY] [-fas] [-fass] [-ff FROM_FIRST] [-fgw [FORCE_GRID_WRAP]] [-fss] [-i INDENT] [-j JOBS] [-k] [-l LINE_LENGTH] [-lai LINES_AFTER_IMPORTS] [-lbt LINES_BETWEEN_TYPES] [-le LINE_ENDING] [-ls] [-m {0,1,2,3,4,5,6,7}] [-nis] [-nlb NO_LINES_BEFORE] [-ns NOT_SKIP] [-o KNOWN_THIRD_PARTY] [-ot] [-p KNOWN_FIRST_PARTY] [-q] [-r] [-rm REMOVE_IMPORTS] [-rr] [-rc] [-s SKIP] [-sd DEFAULT_SECTION] [-sg SKIP_GLOB] [-sl] [-sp SETTINGS_PATH] [-t FORCE_TO_TOP] [-tc] [-up] [-v] [-vb] [--virtual-env VIRTUAL_ENV] [--conda-env CONDA_ENV] [-vn] [-w LINE_LENGTH] [-wl WRAP_LENGTH] [-ws] [-y] [--unsafe] [--case-sensitive] [--filter-files] [files [files ...]] isort: error: unrecognized arguments: --profile kowshik:avocado-vt$

kowshik:avocado-vt$ isort --profile black virttest/asset.py usage: isort [-h] [-a ADD_IMPORTS] [-ac] [-af] [-b KNOWN_STANDARD_LIBRARY] [-c] [-ca] [-cs] [-d] [-df] [-ds] [-dt] [-e] [-f KNOWN_FUTURE_LIBRARY] [-fas] [-fass] [-ff FROM_FIRST] [-fgw [FORCE_GRID_WRAP]] [-fss] [-i INDENT] [-j JOBS] [-k] [-l LINE_LENGTH] [-lai LINES_AFTER_IMPORTS] [-lbt LINES_BETWEEN_TYPES] [-le LINE_ENDING] [-ls] [-m {0,1,2,3,4,5,6,7}] [-nis] [-nlb NO_LINES_BEFORE] [-ns NOT_SKIP] [-o KNOWN_THIRD_PARTY] [-ot] [-p KNOWN_FIRST_PARTY] [-q] [-r] [-rm REMOVE_IMPORTS] [-rr] [-rc] [-s SKIP] [-sd DEFAULT_SECTION] [-sg SKIP_GLOB] [-sl] [-sp SETTINGS_PATH] [-t FORCE_TO_TOP] [-tc] [-up] [-v] [-vb] [--virtual-env VIRTUAL_ENV] [--conda-env CONDA_ENV] [-vn] [-w LINE_LENGTH] [-wl WRAP_LENGTH] [-ws] [-y] [--unsafe] [--case-sensitive] [--filter-files] [files [files ...]] isort: error: unrecognized arguments: --profile

Signed-off-by: Kowshik Jois B S <[email protected]>
@bskjois
Copy link
Contributor Author

bskjois commented Nov 1, 2024

@chloerh I understood what was missing. Instead of using the isort command downloaded via pip3, I was using the one which was downloaded with dnf. Now I used the pip3 one and all the checks are successful.

@chloerh chloerh merged commit 520bada into avocado-framework:master Nov 4, 2024
50 checks passed
@bskjois bskjois deleted the removePy2Support branch November 4, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants