V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 10 天前 · 1163 次点击

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

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

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

    2 条回复    2024-09-06 07:00:25 +08:00
    mayli
        1
    mayli  
       10 天前
    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
       10 天前
    @mayli #1 我的整个 .venv 文件夹都是 Excluded...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1002 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 19:14 · PVG 03:14 · LAX 12:14 · JFK 15:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.