Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[next-major] Remove traces of CamelCase

未关闭
#200 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@elfkuzco 已经在做这个了。

开始于 2024年11月29日。

  • #212 来自 @elfkuzco —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
停滞
技术栈
python
领域
api

调研方向

从 issue 中展示的 Python wrapper 声明开始,找出 writer、suggestion 和 search API 中剩余的 CamelCase 名称。将这些暴露的方法和参数重命名为 snake_case,移除相关的命名例外,并确认引用和检查在下一次 major release 之前使用新的 API。

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

描述

good first issue

As libzim uses CamelCase, we sometimes followed the convention to stick to the pure-wrapper way.
Given case is not that important and we don't follow it everywhere (it's become minor overtime), we should just remove the remaining traces and use snake case everywhere.

It's a tiny change but obviously breaks the API so should not be merged until approaching next major release

# writer
    def config_nbworkers(self, nbWorkers: int) -> Self: ...  # noqa: N803
    def set_mainpath(self, mainPath: str) -> Self: ...  # noqa: N803
    def add_redirection(
        self,
        path: str,
        title: str,
        targetPath: str,  # noqa: N803
        hints: dict[Hint, int],
    ) -> None: ...
    def add_alias(
        self,
        path: str,
        title: str,
        targetPath: str,  # noqa: N803
        hints: dict[Hint, int],
    ) -> None: ...
# suggestion
    def getEstimatedMatches(self) -> int: ...  # noqa: N802
# search
    def getEstimatedMatches(self) -> int: ...  # noqa: N802
    def getResults(self, start: int, count: int) -> SearchResultSet: ...  # noqa: N802
主要语言
Python
星标
110
派生
29
平均合并
2 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

openzim/python-libzim 的其他 Issue

查看 openzim/python-libzim 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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