| # Copyright 2022 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # |
| # Config file for the isort python module. |
| # This is used to enforce import sorting standards. |
| # |
| # https://pycqa.github.io/isort/docs/configuration/options.html |
| |
| [settings] |
| # Be compatible with `black` since it also matches what we want. |
| profile = black |
| |
| line_length = 80 |
| length_sort = false |
| force_single_line = true |
| lines_after_imports = 2 |
| from_first = false |
| case_sensitive = false |
| force_sort_within_sections = true |
| order_by_type = false |
| |
| # Ignore generated files. |
| extend_skip_glob = *_pb2.py |
| |
| # Have to mark third_party/ libs as third party. |
| # And libraries we list in cros lint's PYTHONPATH. |
| # NB: Keep in sync with pylintrc. |
| known_third_party = |
| _emerge, |
| apiclient, |
| chromite.third_party, |
| elftools, |
| gcloud, |
| google, |
| googleapiclient, |
| httplib2, |
| jinja2, |
| jsonschema, |
| lddtree, |
| magic, |
| mock, |
| oauth2client, |
| portage, |
| pylint, |
| requests, |
| six, |
| sqlalchemy, |
| yaml, |
| |
| known_first_party = |
| chromite |
| |
| # Allow importing multiple classes on a single line from these modules. |
| # https://google.github.io/styleguide/pyguide#s2.2-imports |
| single_line_exclusions = |
| abc, |
| chromite.api.gen.config.replication_config_pb2, |
| chromite.third_party.google.protobuf.struct_pb2, |
| chromite.third_party.infra_libs.buildbucket.proto, |
| collections.abc, |
| typing, |