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

13 天前
 Trim21

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

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

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

1241 次点击
所在节点    Python
2 条回复
mayli
13 天前
To exclude a directory from auto import in PyCharm, you can right-click on the directory and select Mark Directory as then Excluded.
Trim21
13 天前
@mayli #1 我的整个 .venv 文件夹都是 Excluded...

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1070601

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX