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

Bug: duplicate argument 'name' in path and body #16

Closed
ASRagab opened this issue Feb 6, 2023 · 3 comments · Fixed by #17
Closed

Bug: duplicate argument 'name' in path and body #16

ASRagab opened this issue Feb 6, 2023 · 3 comments · Fixed by #17
Labels
bug Something isn't working

Comments

@ASRagab
Copy link

ASRagab commented Feb 6, 2023

Minimal reproduction:

from githubkit import GitHub, TokenAuthStrategy
gh = GitHub(TokenAuthStrategy("")).rest

Error:

Traceback (most recent call last):

  File "/usr/local/lib/python3.8/dist-packages/IPython/core/interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File ["<ipython-input-3-4ec18c08ad11>"](https://localhost:8080/#), line 1, in <module>
    from githubkit import GitHub, TokenAuthStrategy

  File "/usr/local/lib/python3.8/dist-packages/githubkit/__init__.py", line 2, in <module>
    from .github import GitHub as GitHub

  File "/usr/local/lib/python3.8/dist-packages/githubkit/github.py", line 16, in <module>
    from .core import GitHubCore

  File "/usr/local/lib/python3.8/dist-packages/githubkit/core.py", line 24, in <module>
    from .auth import BaseAuthStrategy, TokenAuthStrategy, UnauthAuthStrategy

  File "/usr/local/lib/python3.8/dist-packages/githubkit/auth/__init__.py", line 1, in <module>
    from .app import AppAuthStrategy as AppAuthStrategy

  File "/usr/local/lib/python3.8/dist-packages/githubkit/auth/app.py", line 10, in <module>
    from githubkit.rest import (

  File "/usr/local/lib/python3.8/dist-packages/githubkit/rest/__init__.py", line 25, in <module>
    from .actions import ActionsClient

  File "/usr/local/lib/python3.8/dist-packages/githubkit/rest/actions.py", line 2189
    def update_org_variable(
    ^
SyntaxError: duplicate argument 'name' in function definition

Not a python expert, but the error seems to be here:

name: Union[Unset, str] = UNSET,

name: Union[Unset, str] = UNSET,

Same possible issue in the async version of the signature. Issue is not present in 0.9.4

@yanyongyu
Copy link
Owner

yanyongyu commented Feb 6, 2023

It seems both body and path has a field names name. We should make some patches to avoid field name conflict.

@yanyongyu yanyongyu added the bug Something isn't working label Feb 6, 2023
@yanyongyu yanyongyu changed the title SyntaxError: duplicate argument 'name' in function definition in 0.9.5 Bug: duplicate argument 'name' in path and body Feb 6, 2023
@yanyongyu
Copy link
Owner

I just published a new version and yanked version 0.9.5. Thx for your feedback! 😄

@ASRagab
Copy link
Author

ASRagab commented Feb 6, 2023

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants