V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
Trim21
V2EX  ›  Python

pycharm 现在如何设置在导入建议中隐藏特定的包?

  •  
  •   Trim21 ·
    Trim21 · Sep 6, 2024 · 9210 views
    This topic created in 599 days ago, the information mentioned may be changed or developed.

    今天用到 defaultdict ,然后 pycharm 建议了一堆 mypy 里面的 defaultdict 。

    看网上之前的说法可以在“Settings -> Editor -> Auto Import -> Exclude from Import and Completion”里面可以设置,但是新版 pycharm 里面已经没这个选项了。现在有什么办法隐藏 mypy 或者其他某个包里面的提示吗?

    看了一下 go 和 js/ts 都有对应的选项可以中导入中排除特定包,但是 python 没有...

    2 replies    2024-09-06 07:00:25 +08:00
    mayli
        1
    mayli  
       Sep 6, 2024
    To exclude a directory from auto import in PyCharm, you can right-click on the directory and select Mark Directory as then Excluded.
    Trim21
        2
    Trim21  
    OP
       Sep 6, 2024
    @mayli #1 我的整个 .venv 文件夹都是 Excluded...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5857 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 06:08 · PVG 14:08 · LAX 23:08 · JFK 02:08
    ♥ Do have faith in what you're doing.