Giter Club home page Giter Club logo

mypy-tools's Introduction

mypy-tools

A handful of tools to make using mypy a little easier.

Installing

Just run pip install mypytools

Typechecking server

mypy_server.py is a multithreaded typechecking server for MyPy. It loads a dependency graph for the Python files in a set of directories. When one of the files is modified, it typechecks that file along with all files which depend on it. You can configure it for your project by adding a .mypy_server file at the root of your project. See the example in this repository.

Linter for new annotations

check_mypy_annotations.py is a script that can be used in combination with a linter to encourage users to add type annotations to functions they've modified. It compares the current HEAD to master, attributes all new lines back to their associated function, and prints an error if that function doesn't have type annotations.

Annotation coverage

print_mypy_coverage.py is a script to print how many functions have MyPy type annotations. It consumes a list of Python files which it scans for annotations and then prints a directory hierarchy along with the associated annotation coverage.

Custom arcanist linter

MypyLinter.php is a custom linter for the arcanist CLI for phabricator. It interacts directly with mypy_server.py and check_mypy_annotations.py to arc lint MyPy superpowers.

mypy-tools's People

Contributors

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