mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

Simplify isort filters and move it into isort cfg file. With this change, isort will not longer apply to diffs other than to files that are in whitelisted directory (isort only supports blacklist so we implement that instead) This is much simpler than building our own whitelist logic since our formatter runs multiple codepaths depending on whether it is formatting a single file / PR / entire repo in CI.
21 lines
1.2 KiB
INI
21 lines
1.2 KiB
INI
[settings]
|
|
# This is to make isort compatible with Black. See
|
|
# https://black.readthedocs.io/en/stable/the_black_code_style.html#how-black-wraps-lines.
|
|
line_length=88
|
|
profile=black
|
|
multi_line_output=3
|
|
include_trailing_comma=True
|
|
use_parentheses=True
|
|
float_to_top=True
|
|
filter_files=True
|
|
|
|
# Skip docs/* as these are carefully crafted and aren't strictly code.
|
|
# Skip python/ray/*.py to avoid touching python/ray/__init__.py, which
|
|
# is also carefully crafted.
|
|
# For the rest we will gradually remove them from the blacklist as we
|
|
# reformat the code to follow the style guide.
|
|
skip_glob=python/ray/*.py,doc/*,ci/*,python/ray/_raylet*,python/ray/_private/*,python/ray/air/*,python/ray/cloudpickle/*,python/ray/core/*,dashboard/*,python/ray/data/*,python/ray/experimental/*,python/ray/includes/*,python/ray/internal/*,python/ray/ray_operator/*,python/ray/scripts/*,python/ray/serve/*,python/ray/sgd/*,python/ray/streaming/*,python/ray/tests/*,python/ray/tests/*,python/ray/train/*,python/ray/tune/*,python/ray/util/*,python/ray/workers/*,python/ray/workflow/*,rllib/*,release/*,
|
|
|
|
known_local_folder=ray
|
|
known_afterray=psutil,setproctitle
|
|
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER,AFTERRAY
|