cutlet icon indicating copy to clipboard operation
cutlet copied to clipboard

Put use_foreign_spelling and ensure_ascii in constructor.

Open PlaylistsTrance opened this issue 3 years ago • 1 comments

Is there a reason why use_foreign_spelling=True, ensure_ascii=True are not in the Cutlet constructor __init__? Placing these in the constructor would help IDE software provide the user information about these modifiable attributes and their defaults, and it is more intuitive (for me at least) to write katsu = cutlet.Cutlet(use_foreign_spelling=False).

PlaylistsTrance avatar Feb 17 '22 16:02 PlaylistsTrance

Thanks for the suggestion, that's a good idea.

There's no specific reason it's not in the constructor, but the internal attributes were added as-needed while development was active. Since they seem reasonably stable now it should be fine to move some of them into the constructor.

polm avatar Feb 18 '22 06:02 polm

It took forever, but I just released 0.2.0 with this feature.

polm avatar Jun 14 '23 13:06 polm

Hey, thanks for adding it to the constructor, but it looks like you forgot to use the constructor variables to set the class variables, see line 123. In the class, you have

        self.use_foreign_spelling = True
        self.ensure_ascii = True

instead of

        self.use_foreign_spelling = use_foreign_spelling
        self.ensure_ascii = ensure_ascii

PlaylistsTrance avatar Jul 31 '23 13:07 PlaylistsTrance

Well that's embarrassing, thanks for pointing it out. I just released 0.2.1, which should fix that.

polm avatar Jul 31 '23 13:07 polm