Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Switch to pep-8 #717

@Cerno-b

Description

@Cerno-b

The codebase seems to adhere to the camelcase notation generally used in C++, likely to keep in line with Qt's function naming.

I was wondering whether you might be open to switching to the Python-recommended naming scheme defined in the PEP-8 https://www.python.org/dev/peps/pep-0008/

Of course, PEP-8 clearly states in the beginning that it should not be applied blindly, however this has become a somewhat standard in the python world that most code analysis tools support and it makes for a more unified and well-readable code base.

I would offer to make the conversion to PEP-8 for labelImg if you would go along with it, but I understand that this is a huge change that touches almost all code files and will cause pending pull-requests to be affected, so it might not be high (or at all) on your priority list.

I would probably do this in multiple steps, with the first step being to convert all the variable and function names to snake-case, so that each line of code stays exactly where it is, which would make adapting outstanding pull-requests easy without breaking anything. Later, I would make some style changes that actually improve code readability so that all warnings that a tool like lint would report, vanish. This makes future bugs easier to identify and avoid while coding.

Please let me know if you are open to the idea of switching to PEP-8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions