Skip to content

Remove underscore prefix from (almost) all files #1206

@atilag

Description

@atilag

What is the expected enhancement?

As we are transitioning from relative imports to absolute imports:

from ._module import Class ---> from qiskit.module import _module

We are introducing code like:

circuit = _quantumcircuit.QuantumCircuit()

... this code is telling me that I want a QuantumCircuit class from an internal/private _module, but QuantumCircuit is not internal nor private.

The concept of internal classes has been diffused during all this time, and I don't think we have this concept anymore, at least not in the vast majority of the files.
So in order to keep code cleaner, I'd suggest to remove underscore prefix from all the files that we have doubts about its domain and files we know they are meant to be used by other components (I'd say all of them).

This is somewhat of a large change, mostly style related so I'm labeling this issue as discussion just in case someone has different views.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions