AnswerDotAI / AnswerDotAI/nbdev

Add option to expand wildcard imports

未关闭
#656 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Jupyter Notebook
星标
5.3k
派生
513
平均合并
2 天 30 分钟
30 天内合并 PR
8

描述

E.g

from foo import *

...would be optionally exported to:

from foo import a,b

...if `a` and `b` were used in that module.

There's something a bit similar here we could borrow ideas from: https://github.com/fake-name/autoflake/blob/master/autostar.py

贡献指南

打开贡献指南

调研方向

首先检查 nbdev 如何处理 Python 导入,并将请求的行为与 autoflake's autostar.py 中的思路进行比较。定义 `from foo import *` 的可选扩展,使其只导出模块中使用的名称,然后验证生成的导入与示例一致,并在禁用该选项时保留当前行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
tooling
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。