Commit graph

10 commits

Author SHA1 Message Date
clarng
b2cdd45e7c
Update import sorting blacklist, enable sorting for experimental dir (#26101)
Why are these changes needed?
There are directories that we don't lint / format. Ensure they are also the case for the import sorting tool.

Enable sorting for python/experimental to show case how to enable sorting for a directory as we convert more of the directories to be automatically sorted by the tool.
2022-07-12 21:25:58 -07:00
Simon Mo
88a219c7f2
Revert "Revert "[AIR][Serve] Rename ModelWrapperDeployment -> PredictorDeployment"" (#26231) 2022-07-05 13:26:49 -07:00
Stephanie Wang
c9be251b7a
Revert "[AIR][Serve] Rename ModelWrapperDeployment -> PredictorDeployment (#25962)" (#26176)
This reverts commit 68692b3464.
2022-06-28 17:07:07 -07:00
Simon Mo
68692b3464
[AIR][Serve] Rename ModelWrapperDeployment -> PredictorDeployment (#25962) 2022-06-28 10:26:10 -07:00
clarng
f7d0ad3bb7
Enable isort for base directory (#26085)
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
2022-06-24 15:32:51 -07:00
clarng
2b270fd9cb
apply isort uniformly for a subset of directories (#25824)
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.
2022-06-17 13:40:32 -07:00
clarng
ef866d1e49
exclude doc_code from import sorting (#25772)
Skip sorting the imports in doc_code.
2022-06-15 11:34:45 -07:00
clarng
badf444eda
Respect import order for psutil and setproctitle (#25780)
Sort imports in a way that preserves the ordering requirements. This PR is needed for any file changes that imports psutil or setproctitle.
2022-06-14 17:44:41 -07:00
clarng
e27cb0a585
Make isort compatible with black (#25748)
Make isort compatible with black
2022-06-13 23:00:48 -07:00
clarng
73e113152b
Add import sorting to format.sh (#25678)
It will be easier to develop if we could use a tool to organize / sort imports and not have to move them around by hand.

This PR shows how we could do this with isort (black doesn't quite do this per https://github.com/psf/black/issues/333)

After this PR lands everyone will need to update their formatter to include isort if they don't have it already, i.e.

   pip install -r ./python/requirements_linters.txt 

All future file changes will go through isort and may introduce a slightly larger PR the first time as it will clean up the imports. 

The plan is to land this PR and also clean up the rest of the code in parallel by using this PR to format the codebase (so people won't get surprised by the formatter if the file hasn't been touched yet)

Co-authored-by: Clarence Ng <clarence@anyscale.com>
2022-06-13 14:08:51 -07:00