Import order coding standard

后端 未结 4 1443
暗喜
暗喜 2021-01-29 21:32

PEP8 suggests that:

Imports should be grouped in the following order:

  1. standard library imports
  2. related third party imports
4条回答
  •  时光取名叫无心
    2021-01-29 21:52

    A flake8 plugin exists: flake8-import-order.

    This package adds 3 new flake8 warnings

    I100: Your import statements are in the wrong order.

    I101: The names in your from import are in the wrong order.

    I201: Missing newline between sections or imports.

提交回复
热议问题