Skip to content

Commit

Permalink
Enable isort for base directory (ray-project#26085)
Browse files Browse the repository at this point in the history
Remove base dir : 'python/ray/*.py' from the isort blacklist. This is needed so it will run isort on subdirectories under python/ray, and allow us to start enabling isort for subdirectories
  • Loading branch information
clarng authored Jun 24, 2022
1 parent f71a468 commit f7d0ad3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ 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.
# Skip python/ray/__init__.py and python/ray/setup-dev.py, which
# are 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/*,
skip_glob=python/ray/__init__.py,python/ray/setup-dev.py,python/ray/dag/*.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
Expand Down
3 changes: 2 additions & 1 deletion python/ray/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Optional, Union

import colorama
import setproctitle

import ray._private.ray_constants as ray_constants
import ray.cloudpickle as pickle
Expand All @@ -17,6 +16,8 @@
)
from ray.util.annotations import DeveloperAPI, PublicAPI

import setproctitle


@PublicAPI
class RayError(Exception):
Expand Down
2 changes: 1 addition & 1 deletion python/ray/job_submission/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ray.dashboard.modules.job.common import JobInfo, JobStatus
from ray.dashboard.modules.job.sdk import JobSubmissionClient
from ray.dashboard.modules.job.common import JobStatus, JobInfo

__all__ = ["JobSubmissionClient", "JobStatus", "JobInfo"]

0 comments on commit f7d0ad3

Please sign in to comment.