Giter Site home page Giter Site logo

tuchandra / python-type-stubs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/python-type-stubs

0.0 2.0 0.0 1.4 MB

A set of type stubs for popular Python packages. These are works in progress from the Microsoft Python team and others, with the intent that they are contributed to typeshed or to the associated packages once sufficiently complete.

License: MIT License

Python 100.00%

python-type-stubs's Introduction

Python Type Stubs

Introduction

As the Python team, we are helping to ensure that packages have high-quality type annotations. In cases where this must be done through type stubs, we are contributing stubs to typeshed. This repository contains our “work in progress”. Once the stubs for a package meet the requirements of typeshed, we will contribute them to typeshed and delete them from this repository.

Our Use of Type Stubs

Microsoft's Python Language Server Pylance uses type information to implement useful features like autocompletion and type checking. For best results, type annotations must be provided for functions, methods and variables.

There are two ways type annotations can be provided — through inline type annotations and through .pyi type stub files, which may be bundled with the package or installed separately from some other source such as typeshed or PyPI. We believe that the best approach for package authors is to have explicit inline type annotations that accurately and completely describe their public interface contract. This allows tools to validate the types for the package authors themselves and reduces the maintenance burden of keeping two separate API definitions in sync. In cases where inline type annotations are not possible (e.g. for compiled libraries), packages should include stub files that describe those portions of the interface.

We recognize that there may be cases where type stubs are more appropriate, such as:

  • Package authors who do not want to include type annotations, and
  • Large, complex packages where adding type annotations can take time, and stubs may be an appropriate intermediate step.

Upstreamed libraries

The following libraries have been contributed upstream (to typeshed or the libraries themselves) and are no longer maintained here:

  • aiofiles
  • cachetools
  • deprecated
  • filelock
  • freezegun
  • markdown
  • packaging
  • PIL
  • retry
  • slugify

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

python-type-stubs's People

Contributors

bschnurr avatar domandinho avatar dr-irv avatar erictraut avatar gramster avatar heejaechang avatar jakebailey avatar joyceerhl avatar judej avatar karthiknadig avatar mapleccc avatar matangover avatar microsoft-github-operations[bot] avatar microsoftopensource avatar msfterictraut avatar oliver-ni avatar tmke8 avatar tuchandra avatar

Watchers

 avatar  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.