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

feature: API checks: Report new positional-or-keyword parameters inserted before other positional-or-keyword parameters #247

Open
pawamoy opened this issue Mar 11, 2024 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@pawamoy
Copy link
Member

pawamoy commented Mar 11, 2024

Is your feature request related to a problem? Please describe.

I noticed in a git-changelog PR that this diff

 class Commit:
     """A class to represent a commit."""

     def __init__(
         self,
         commit_hash: str,
         author_name: str = "",
         author_email: str = "",
         author_date: str | datetime = "",
         committer_name: str = "",
         committer_email: str = "",
         committer_date: str | datetime = "",
         refs: str = "",
+        parent_hashes: str | list[str] = "",
         subject: str = "",
         body: list[str] | None = None,
         url: str = "",
         *,
         parse_trailers: bool = False,
     ):

...does not yield any warning. However the new parameter parent_hashes shifts subject, body and url positional-or-keyword parameters. So it's a breaking change.

Describe the solution you'd like

Report such inserted positional-or-keyword parameters when checking for breaking changes.

Describe alternatives you've considered

/

Additional context

/

@pawamoy pawamoy added the feature New feature or request label Mar 11, 2024
@pawamoy pawamoy self-assigned this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant