Skip to content

The OpenCC module currently lacks an explicit __all__ definition in __init__.py. #31

Open

Description

@rintrint

This can lead to ambiguity in what is intended to be exposed when using from opencc import *.

Adding __all__ = ["OpenCC"] will:

  • Clearly define OpenCC as part of the public API.
  • Avoid potential issues with unintended imports.
  • Improve maintainability and clarify module structure.

This follows Python best practices for explicitly defining module exports.

##########################################################
# Author: Yichen Huang (Eugene)
# GitHub: https://github.com/yichen0831/opencc-python
# January, 2016
##########################################################

from .opencc import OpenCC

+ __all__ = ["OpenCC"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions