Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Argument Clinic: make error messages more helpful to developers #115077

Copy link
Copy link
@erlend-aasland

Description

@erlend-aasland
Issue body actions

Some1 of the Argument Clinic error messages only point to the problem in the clinic input, but do not suggest how to fix it. Suggesting to do an audit of clinic.py and improve the error messages that are too implicit or provide too little information/context to the developer.

Random selection of error messages that might be improved:

  • "Too many var args" (how many are there now? what is too many?)
  • "Not enough arguments for destination {name!r} new {type!r}" (how many arguments are expected, and what kind of arguments are they?)
  • "Can't clear destination {name!r}: it's not of type 'buffer'" (what type is it?)
  • "Custom printers are broken right now"
  • "bool_converter: illegal 'accept' argument {accept!r}" (why is it illegal? how to fix this?)
  • "char_converter: illegal default value {default!r}" (which values are legal? how to fix this?)
  • "illegal combination of arguments""
  • "'kind' of function and cloned function don't match! (@classmethod/@staticmethod/@coexist)" (what was the mismatch?)

(There might be better examples; this was the result of a very quick and short audit.)

cc. @sobolevn

Linked PRs

Footnotes

  1. but, definitely not all!

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.