Giter Club home page Giter Club logo

pyright-inlay-hints's Introduction

Support for inlay hints

This fork extends Pyright with inlay hints support. Initial implementation of the inlay hint provider was adapted from coc-pyright.

Pyright is a full-featured, standards-based static type checker for Python. It is designed for high performance and can be used with large Python source bases.

Pyright includes both a command-line tool and an extension for Visual Studio Code.

Pyright Playground

Try Pyright in your browser using the Pyright Playground.

Documentation

Refer to the documentation for installation, configuration, and usage details.

Community

Do you have questions about Pyright or Python type annotations in general? Post your questions in the discussion section.

If you would like to report a bug or request an enhancement, file a new issue in either the pyright or pylance-release issue tracker. In general, core type checking functionality is associated with Pyright while language service functionality is associated with Pylance, but the same contributors monitor both repos. For best results, provide the information requested in the issue template.

Contributing

This project welcomes contributions and suggestions. For feature and complex bug fix contributions, it is recommended that you first discuss the proposed change with Pyright’s maintainers before submitting the pull request. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Forked from pyright.

pyright-inlay-hints's People

Contributors

ashb avatar bschnurr avatar cclauss avatar cdce8p avatar christopher-hesse avatar debonte avatar dependabot[bot] avatar detachhead avatar erictraut avatar fannheyward avatar heejaechang avatar higoshi avatar jakebailey avatar jbradaric avatar jellezijlstra avatar kinow avatar ljw1004 avatar mhzed avatar microsoftopensource avatar msfterictraut avatar nihaals avatar pylancebot avatar qubitron avatar rchiodo avatar robertcraigie avatar simonjayhawkins avatar thetriplev avatar tonybaloney avatar vemel avatar zeronone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyright-inlay-hints's Issues

Incorrect function return type

Wrong function return type, probably an issue with extracting the return type from hover response:

def constantly(value):
    return lambda: value

class A:
    def __init__(self, x=constantly(None), y=20):
        pass

image

Can't build in arch linux (AUR)

I got this error log when building pyright-inlay-hints-git in AUR:

ERROR in ~/.cache/yay/pyright-inlay-hints-git/src/pyright/packages/pyright-internal/src/analyzer/typeEvaluator.ts
../pyright-internal/src/analyzer/typeEvaluator.ts 170:4-27
[tsl] ERROR in ~/.cache/yay/pyright-inlay-hints-git/src/pyright/packages/pyright-internal/src/analyzer/typeEvaluator.ts(170,5)
      TS2440: Import declaration conflicts with local declaration of 'MatchArgsToParamsResult'.

webpack compiled in 25560 ms
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: pyright-inlay-hints-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
pyright-inlay-hints-git - exit status 4

It's a bug in the code I guess?

[HowTo] get inlay hints working with neovim

I was managed to get semantic highlight working with neovim.

But it seems that, I can not able to get the inlayHints working. I woundering what option should I be using here, from coc-pyright it is set via pyright.inlayHints.functionReturnTypes. Is that true here as well?

I tried,

        pyright = { settings = { pyright = { inlayHints = { functionReturnTypes = true } } } },

but seems like I can not get the inlayhint working.

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.