Skip to content

Create Pyi parser #22

Closed
Closed

Description

@alexpantyukhin

There is parser in progress for parsing PYI ast: https://github.com/alexpantyukhin/PythonParser
From tests it seems that now it's possible to parse some simple modules without 'IF's.

Activity

  1. alexpantyukhin commented on Nov 1, 2021

    @alexpantyukhin
    ContributorAuthor

    There are still some problems with parsing type's. But going to fix that soon.

  2. dbrattli commented on Nov 2, 2021

    @dbrattli
    Collaborator

    Great effort! Keep up the good work!

  3. alexpantyukhin commented on Nov 8, 2021

    @alexpantyukhin
    ContributorAuthor

    Parser in progress. Tested it today on whole pyi files in https://github.com/python/typeshed/tree/master/stdlib . it raises error in 175 cases from 885 files. Keep working with this.

  4. dbrattli commented on Nov 8, 2021

    @dbrattli
    Collaborator

    That is really great progress!! Sorry I haven't had much time to look at it yet since I have been busy with the compiler (and Jupyter).

  5. alexpantyukhin commented on Nov 17, 2021

    @alexpantyukhin
    ContributorAuthor

    Now there are 12 files from whole typeshed raises error (some except situation for stdlib and left for protobuf from stubs). Now I'm thinking how it could be best way to generate the Fable AST and compile it to files. I guess It's the time where I can move forward with this.

  6. dbrattli commented on Nov 21, 2021

    @dbrattli
    Collaborator

    @alexpantyukhin Not sure I understand what you mean about generate Fable AST? Why Fable AST? Did you mean F# AST to generate F#?

    Btw please note the new [<NamedParams(fromIndex=1)>], e.g: https://github.com/fable-compiler/Fable.Python/blob/main/src/stdlib/Builtins.fs#L123 on how to handle e.g named only arguments and methods with optional arguments.

  7. dbrattli commented on May 3, 2026

    @dbrattli
    Collaborator

    Closing this since there is no plans to auto-generate bindings from stub files and is out of scope for this library.

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