Isort: Unknown options in the readme file?

Created on 15 Jan 2020  路  2Comments  路  Source: PyCQA/isort

Hi.

This is in the readme file:

known_django=django
known_pandas=pandas,numpy
sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,PANDAS,FIRSTPARTY,LOCALFOLDER 

Are known_django and known_pandas an actual setting? They are not referenced in the wiki. I assume it's a typo.

Thanks

question

Most helpful comment

The sections will associate themselves with the known_ sections, so you will always have your django imports in a separate section, and your pandas and numpy imports together in their own section. You can see the code that references it here: https://github.com/timothycrosley/isort/blob/0ee43b6a4f3c40876c3c7714846ecf8e584dc314/isort/finders.py#L79-L84

And in the README: https://github.com/timothycrosley/isort/blob/2cb3ec41651ee7f539433d1409933e4125e4925e/README.md#L219
https://github.com/timothycrosley/isort/blob/2cb3ec41651ee7f539433d1409933e4125e4925e/README.md#how-does-isort-work

All 2 comments

The sections will associate themselves with the known_ sections, so you will always have your django imports in a separate section, and your pandas and numpy imports together in their own section. You can see the code that references it here: https://github.com/timothycrosley/isort/blob/0ee43b6a4f3c40876c3c7714846ecf8e584dc314/isort/finders.py#L79-L84

And in the README: https://github.com/timothycrosley/isort/blob/2cb3ec41651ee7f539433d1409933e4125e4925e/README.md#L219
https://github.com/timothycrosley/isort/blob/2cb3ec41651ee7f539433d1409933e4125e4925e/README.md#how-does-isort-work

Marking this as closed as @StephenBrown2's explanation is spot on

Was this page helpful?
0 / 5 - 0 ratings