Skip to content

[Code scan] Fix invalid dftio.data __all__ exports #35

Description

@njzjz

This issue comes from a Codex global repository scan.

Problem

dftio.data.__all__ contains imported objects instead of string names:

__all__ = [
AtomicData,
PBC,
register_fields,
deregister_fields,
block_to_feature,
feature_to_block,
_register_field_prefix,
feature_to_block,
OrbitalMapper,
_NODE_FIELDS,
_EDGE_FIELDS,
_GRAPH_FIELDS,
_LONG_FIELDS,
]

Python expects every __all__ entry to be a string. As written, wildcard imports fail instead of exporting the public API.

Reproduction

Run:

from dftio.data import *

This raises TypeError: Item in dftio.data.__all__ must be str.

Suggested fix

Change entries to string names and remove the duplicate feature_to_block entry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions