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
update isort and black #251
Conversation
hmm ok. the CI is failing because a new version of not sure what would be the best to fix this. One option would be to create a venv in #!/usr/bin/env bash
set -e
python -m venv lint
source lint/bin/activate
pip install black==19.10b0 "isort>=4.3.21,<5.0"
black --check datamodel_code_generator tests
isort --check-only datamodel_code_generator tests
deactivate
rm -r lint
mypy datamodel_code_generator
what do you think @koxudaxi? |
@Chilipp I have checked your PR. if isort.__version__.startswith('4.'):
return SortImports(file_contents=code).output
else:
return isort.code(code)
I think the change is good 👍 |
as suggested by koxudaxi#251 (comment)
as suggested in koxudaxi#251 (comment)
don't know why this dropped out...
alright, the same problem now with #!/usr/bin/env bash
set -e
python -m venv venv
source venv/bin/activate
pip install -e .[all] isort==4.3.21 "black>=19.10b0,<20"
pytest --cov=datamodel_code_generator --cov-report term-missing tests
deactivate
rm -r venv what do you think @koxudaxi ? |
@Chilipp |
as suggested in koxudaxi#251 (comment)
Codecov Report
@@ Coverage Diff @@
## master #251 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 12 +1
Lines 1020 1082 +62
Branches 201 210 +9
=========================================
+ Hits 1020 1082 +62
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
alright, seems to work @koxudaxi 😄 I am done here, merge it if you like Thanks a lot again for your work on this =) |
I just came up with a good approach. I may change the shell scripts. Thank you very much. |
sorry, I can't really follow, but do what you think is the best @koxudaxi 😅 |
No problem. I was too late getting the idea 😅 |
awesome! thanks a lot =) |
@Chilipp |
Hey @koxudaxi!
very nice package, thanks a lot for your work on this! I'd like to use it and I am already using the latest version of isort and black. It would be nice if the datamodel-code-generator is compatible with this which is whiy I make this PR.
From my perspective, this PR can be merged if the CI passes.