推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
wencan
V2EX  ›  Python

vscode Ruff 有时不格式化 f-string 内的代码什么情况?

  •  
  •   wencan · Feb 14, 2025 · 4984 views
    This topic created in 598 days ago, the information mentioned may be changed or developed.

    两台电脑 linux 发行版不同 都安装着 vscode+Ruff 同样的项目代码 vscode 版本,一个是 1.97.2 ,一个 1.97.1 1.97.1 正常格式化 f-string ,但 1.97.2 只格式化 f-string 之外的代码,手动执行也不行 尝试了把 1.97.2 的用户数据配置文件全删了,仅安装 python 和 Ruff 两个扩展(含自动安装的),复制另一台电脑的 vscode 配置文件,但还是不能补全

    wencan
        1
    wencan  
    OP
       Feb 14, 2025
    pip 更新下 ruff 好了
    ruff 版本太旧
    hotsymbol
        2
    hotsymbol  
       Feb 15, 2025
    换成 Rust 写
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2567 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 03:50 · PVG 11:50 · LAX 20:50 · JFK 23:50
    ♥ Do have faith in what you're doing.