First of all, thank you for this amazing library. I was in mental anguish adding it today because I kept imagining how much time I could have saved over the years had I known about this earlier. Truly a game changer for me.
That said, I was surprised to see an "experimental" sorting option because that felt like an unnecessary feature, and this library is already doing a lot. isort is a well-established and battle tested library for sorting imports. It works really well, and I have had maybe 1 issue with it in 6+ years which the author patched promptly.
I recommend focusing on your unique value-add and letting other libraries handle the rest.
This is how I combine the two in my Makefile to get the best of both worlds:
# ...
pyflyby: ## Automatically fix missing imports using pyflyby
PYFLYBY_PATH=$(PWD)/app/.pyflyby pipenv run tidy-imports --add-missing $$( { git diff --diff-filter=ACMT --name-only; git diff --cached --name-only --diff-filter=ACMT; } | grep '\.py$$' || true) --canonicalize -r
prepare: pyflyby isort black flake8 ## Run pyflyby, isort, black, and flake8 on code
Just my two cents; I will not be offended if you disagree and close this :)
First of all, thank you for this amazing library. I was in mental anguish adding it today because I kept imagining how much time I could have saved over the years had I known about this earlier. Truly a game changer for me.
That said, I was surprised to see an "experimental" sorting option because that felt like an unnecessary feature, and this library is already doing a lot.
isortis a well-established and battle tested library for sorting imports. It works really well, and I have had maybe 1 issue with it in 6+ years which the author patched promptly.I recommend focusing on your unique value-add and letting other libraries handle the rest.
This is how I combine the two in my Makefile to get the best of both worlds:
Just my two cents; I will not be offended if you disagree and close this :)