Skip to content

Two fields in inspect.FullArgSpec mis-annotated #3361

Closed

Description

@arnimarj

Hi,

It seems that two fields in inspect.FullArgSpec are mis-annotated:

Looking at the implementation of getfullargspec, at the very end this happens:

    if not kwdefaults:
        # compatibility with 'func.__kwdefaults__'
        kwdefaults = None

    if not defaults:
        # compatibility with 'func.__defaults__'
        defaults = None

The two fields kwonlydefaults and defaults need to be Optional[]. This seems to be true for Python 3.4+:

Activity

  1. added
    stubs: false negative
    on Oct 14, 2019
  2. srittau commented on Oct 14, 2019

    @srittau
    Collaborator

    PR welcome!

  3. added a commit that references this issue on Oct 14, 2019
  4. arnimarj commented on Oct 14, 2019

    @arnimarj
    ContributorAuthor
  5. added a commit that references this issue on Oct 14, 2019
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

    stubs: false negative

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions