Visitar URL original
search_* methods serialize list-valued qualifiers as Python list reprs · Issue #3532 · PyGithub/PyGithub · GitHub
Skip to content

search_* methods serialize list-valued qualifiers as Python list reprs #3532

Open

Description

@Bolt4243

All six search_* methods in MainClass.py build query qualifiers with:

query_chunks.append(f"{qualifier}:{value}")

When a qualifier value is a list (or tuple), this produces a Python list repr in the q parameter instead of valid GitHub search syntax:

g.search_repositories("x", language=["python", "ruby"])
# q -> "x language:['python', 'ruby']"   (wrong)

GitHub expects repeated qualifier chunks:

q = "x language:python language:ruby"

Affects search_repositories, search_users, search_issues, search_code, search_commits, and search_topics.

Version

main

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions