GithubHelp home page GithubHelp logo

darrelronald / ironpython-stubs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gtalarico/ironpython-stubs

0.0 1.0 0.0 41.1 MB

Autocomplete stubs for common IronPython/.NET libraries

License: Other

Python 100.00%

ironpython-stubs's Introduction

IronPython Stubs

Stubs for common IronPython CLR assemblies. These stubs are intended to be used by the autocomplete engine of editors like Atom, Sublime, and Visual Studio Code.

Why IronPython Stubs?

If your are writing python code that targets IronPython, and using modules loaded through the Common Language Runtime (clr), your editor's autocomplete engine (which runs on regular python) will not be able to access those non-native modules. In other words, modules/or packages loaded through clr.AddReference() are not available on your autocomplete engine.

The workaround here is simple: Use IronPython to crawl through these libraries, and create 'stubs' or 'mock objects'. These 'stubs' can then be used by the CPython autocomplete engine. The stubs include doc strings as well as constructor/function/method signatures.

This repository contains the code to create these stubs, and also stores an a version of them that can be used by autocomplete-python.

sublime-large-demo


Documentation

Wiki

The wiki has step-by-step instructions for setting up your stubs for Atom, Sublime, Vim, Visual Studio Code.

For a list of supported Assemblies, see this list

If you haven't yet, read Note on Performance Large Namespaces such as Autodesk.Revit.DB can take a long time to be parsed and cached and might not show up right away.


Contribute - WIP

Generate Stubs - Examples

ipy -m ironstubs make RhinoCommon ipy -m ironstubs make --all ipy -m ironstubs make DSCoreNodes --folder="DSCore" --directory="C:/Program Files/Dynamo/Dynamo Core/1.3"

Process Stubs

WIP

Known Issues

  • Performance is not great for some of the larger classes. If you know how this can be improved please let me know.
  • Some of the function/constructor signatures are missing or incorrect. This is a problem with Generator3. Please send a PR or let me know if you have a fix.
  • Overloaded Methods do not show correct arguments

Credits

This project is a fork of the repository started by Gary Edwards on Gitlab. Thank you for your work Gary - and thank you Ehsan for pointing me to it.

It uses PyCharm's Generator3 to create the stubs.

ironpython-stubs's People

Contributors

chuongmep avatar garyedwards avatar gtalarico avatar htlcnn avatar tetov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.