Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Specialize collections.namedtuple #174

Closed

Description

@lostmsu

I noticed PLS has a specialization for typing.NamedTuple, which is, essentially, collections.namedtuple under the hood. Should not be hard to add handling for the later.

I'd be interested on adding a specialization for collections.namedtuple, but I'd like to understand how to add new specializations. Initially, I though it will be as hard as creating a custom CollectionsModuleInfo: BuiltinModule similar to TypingModuleInfo, but then I found also TypingTypeInfo and its Finalize and TypingTypeInfoFinalizer, and a seemingly simple tasks seems convoluted now.

I'd also gladly work on making this exact task simpler in the future.

BTW, here's a commit, that adds a test case for the desired behavior: losttech@0899a19

Activity

  1. MikhailArkhipov commented on Oct 1, 2018

    @MikhailArkhipov

    Yes #15.

  2. lostmsu commented on Oct 1, 2018

    @lostmsu
    ContributorAuthor

    Sorry, obviously a duplicate then.
    Still interested in how to work with it.

  3. MikhailArkhipov commented on Nov 4, 2018

    @MikhailArkhipov

    It actually does not need specialization. It needs proper understanding of typeshed definitions through Type[T] generic. See #339

  4. MikhailArkhipov commented on Feb 8, 2019

    @MikhailArkhipov

    Most probably no longer applies after #425

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

Metadata

Metadata

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