Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public programmatic API #216

Open
akaihola opened this issue Oct 5, 2021 · 0 comments
Open

Public programmatic API #216

akaihola opened this issue Oct 5, 2021 · 0 comments
Labels
question Further information is requested

Comments

@akaihola
Copy link
Owner

akaihola commented Oct 5, 2021

Similar to Black in psf/black#292, Darker should probably define which parts of the Python API are public and guaranteed to be stable according to semantic versioning.

Currently many classes and functions used across module borders inside Darker are not prefixed with an underscore, which could lead developers to assume they belong to a public stable API. However, for many of those code objects it probably doesn't make sense, and instead they should be considered private and internal.

One option is to prefix all functions, classes and methods save a few public ones with underscores, and tweak linter and IDE options to silence warnings about importing them across Darker modules.

The other option is to define the public API in documentation and/or code comments instead.

See #214 for the origin of this discussion.

@akaihola akaihola added the question Further information is requested label Oct 5, 2021
@akaihola akaihola mentioned this issue Oct 5, 2021
@akaihola akaihola added this to the 1.3.2 milestone Oct 5, 2021
@akaihola akaihola modified the milestones: 1.3.2, 1.4.0, 1.4.1 Oct 28, 2021
@akaihola akaihola modified the milestones: 1.4.1, 1.4.2, 1.5.0 Feb 10, 2022
@akaihola akaihola modified the milestones: 1.5.0, 1.6.0 Mar 14, 2022
@akaihola akaihola modified the milestones: 1.6.0, 1.7.0 Apr 6, 2022
@akaihola akaihola modified the milestones: 1.7.0, 1.8.0 Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

1 participant