python-libzim icon indicating copy to clipboard operation
python-libzim copied to clipboard

[next-major] Remove traces of CamelCase

Open rgaudin opened this issue 1 year ago • 4 comments

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

rgaudin avatar Sep 07 '24 15:09 rgaudin

There are also some traces of Pascal case, is it better to change them to snake case too?

SrisharanVS avatar Sep 16 '24 12:09 SrisharanVS

There are also some traces of Pascal case, is it better to change them to snake case too?

Indeed

rgaudin avatar Sep 16 '24 13:09 rgaudin

Also sir i think removing camelcases from setup file is good

siddheshwar-9897 avatar Feb 09 '25 15:02 siddheshwar-9897

@siddheshwar-9897 as you can see, there is already a PR (#212) linked to this ticket which only awaits a new major release. If you think there are additional incorrect CamelCase usage, please expose them here.

rgaudin avatar Feb 10 '25 08:02 rgaudin