skypilot
skypilot copied to clipboard
format.sh is not compatible with Python >= 3.11
Based on the current version pinnings in requirements-dev.txt, format.sh is incompatible with Python versions >= 3.11. Is it possible to upgrade the format script to support versions >= 3.11?
Also, is there a possibility to move to Ruff for linting and formatting? I think it will help unify the format script and provide good speedups (would still need to keep mypy though). The speedups can also help with fast pre-commit hooks.
Below is the traceback on running format.sh
,
Traceback (most recent call last):
File "/home/hd10/micromamba/envs/skypilot/bin/pylint", line 8, in <module>
sys.exit(run_pylint())
^^^^^^^^^^^^
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/pylint/__init__.py", line 21, in run_pylint
from pylint.lint import Run as PylintRun
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/pylint/lint/__init__.py", line 75, in <module>
from pylint.lint.parallel import check_parallel
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/pylint/lint/parallel.py", line 7, in <module>
from pylint import reporters
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/pylint/reporters/__init__.py", line 25, in <module>
from pylint import utils
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/pylint/utils/__init__.py", line 45, in <module>
from pylint.utils.ast_walker import ASTWalker
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/pylint/utils/ast_walker.py", line 6, in <module>
from astroid import nodes
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/astroid/__init__.py", line 53, in <module>
from astroid import inference, raw_building
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/astroid/inference.py", line 33, in <module>
import wrapt
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/wrapt/__init__.py", line 10, in <module>
from .decorators import (adapter_factory, AdapterFactory, decorator,
File "/home/hd10/micromamba/envs/skypilot/lib/python3.11/site-packages/wrapt/decorators.py", line 34, in <module>
from inspect import ismethod, isclass, formatargspec
ImportError: cannot import name 'formatargspec' from 'inspect' (/home/hd10/micromamba/envs/skypilot/lib/python3.11/inspect.py)
I think moving to Ruff would be great. It would fold in most of the tools in format.sh + run a zillion times faster :)
gave it a try. I'm no expert in yapf so I'm not sure about how to translate all constraints from one to the next https://github.com/skypilot-org/skypilot/pull/2971
Awesome! Haven’t looked, but if ruff preserves existing yapf styles such that we don’t have tons of formatting changes, this sounds like a no brainer.
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This issue was closed because it has been stalled for 10 days with no activity.