All Projects → leinardi → Mypy Pycharm

leinardi / Mypy Pycharm

Licence: apache-2.0
A plugin providing both real-time and on-demand scanning of Python files with Mypy from within PyCharm/IDEA.

Programming Languages

python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Mypy Pycharm

Pycharm Themes
TextMate themes for PyCharm
Stars: ✭ 305 (+199.02%)
Mutual labels:  pycharm
Django Rest Framework Tutorial
Django-REST-framework 基本教學 - 從無到有 DRF-Beginners-Guide 📝
Stars: ✭ 630 (+517.65%)
Mutual labels:  pycharm
Idea One Dark Theme
One Dark theme for IntelliJ IDEA, PhpStorm, PyCharm, RubyMine, WebStorm
Stars: ✭ 971 (+851.96%)
Mutual labels:  pycharm
Intellij Idea Tutorial
IntelliJ IDEA 简体中文专题教程
Stars: ✭ 19,071 (+18597.06%)
Mutual labels:  pycharm
Lets Plot
An open-source plotting library for statistical data.
Stars: ✭ 531 (+420.59%)
Mutual labels:  pycharm
Mastering Pycharm Course
Course demos and handouts for Talk Python's Mastering PyCharm course
Stars: ✭ 700 (+586.27%)
Mutual labels:  pycharm
Night Owl Jetbrains
Night owl theme / colour scheme for IntelliJ and Webstorm (or other Jetbrains IDEs). Includes dark and light mode 🌓
Stars: ✭ 276 (+170.59%)
Mutual labels:  pycharm
Python Api Development Fundamentals
Develop a full-stack web application with Python and Flask
Stars: ✭ 44 (-56.86%)
Mutual labels:  pycharm
Translatorx
JetBrains 系列软件汉化包 关键字: Android Studio 3.5 汉化包 CLion 2019.3 汉化包 DataGrip 2019.3 汉化包 GoLand 2019.3 汉化包 IntelliJ IDEA 2019.3 汉化包 PhpStorm 2019.3 汉化包 PyCharm 2019.3 汉化包 Rider 2019.3 汉化包 RubyMine 2019.3 汉化包 WebStorm 2019.3 汉化包
Stars: ✭ 4,856 (+4660.78%)
Mutual labels:  pycharm
Jetbrains Helper
Jetbrains helper
Stars: ✭ 33 (-67.65%)
Mutual labels:  pycharm
Django Tutorial
Django 基本教學 - 從無到有 Django-Beginners-Guide 📝
Stars: ✭ 365 (+257.84%)
Mutual labels:  pycharm
Intellij Plugin Save Actions
Supports configurable, Eclipse like, save actions, including "organize imports", "reformat code" and "rearrange code".
Stars: ✭ 440 (+331.37%)
Mutual labels:  pycharm
Imooc Django
高仿慕课网:py3.5 + Django1.10 + xadmin 搭建的在线课程教育平台
Stars: ✭ 774 (+658.82%)
Mutual labels:  pycharm
Intellij Micropython
Plugin for MicroPython devices in PyCharm and IntelliJ
Stars: ✭ 312 (+205.88%)
Mutual labels:  pycharm
Cookiecutter Pycharm Remote Docker
PyCharm project template for development in remote docker environment
Stars: ✭ 39 (-61.76%)
Mutual labels:  pycharm
Envfile
EnvFile 3.0 is a plugin for JetBrains IDEs that allows you to set environment variables for your run configurations from one or multiple files.
Stars: ✭ 293 (+187.25%)
Mutual labels:  pycharm
Intellij Jvm Options Explained
Common JVM options used with Intellij and what they do
Stars: ✭ 636 (+523.53%)
Mutual labels:  pycharm
Python World
Stars: ✭ 98 (-3.92%)
Mutual labels:  pycharm
Snakecharm
Plugin for PyCharm / IntelliJ IDEA Platform IDEs which adds support for Snakemake language.
Stars: ✭ 40 (-60.78%)
Mutual labels:  pycharm
Runconfigurationasaction
Provides a way to use IntelliJ run configurations as buttons
Stars: ✭ 17 (-83.33%)
Mutual labels:  pycharm

mypy-pycharm

GitHub (pre-)release Travis GitHub license Stars

This plugin provides both real-time and on-demand scanning of Python files with Mypy from within PyCharm/IDEA.

Mypy is a Python source code analyzer which looks for programming errors, helps enforcing a coding standard and sniffs for some code smells (as defined in Martin Fowler's Refactoring book).

mypy plugin screenshot

Installation steps

  1. In the Settings/Preferences dialog (CTRL+Alt+S), click Plugins. The Plugins page opens.
  2. Click Browse repositories.
  3. In the Browse Repositories dialog that opens, right-click on the plugin named Mypy and select Download and Install.
  4. Confirm your intention to download and install the selected plugin.
  5. Click Close.
  6. Click OK in the Settings dialog and restart PyCharm for the changes to take effect.

Configuration

The only configuration needed is to set the path to Mypy executable, and only if is not already inside the PATH environment variable.

To reach the Plugin configuration screen you can open Settings/Preferences dialog (CTRL+Alt+S), click Other Settings and then Mypy or simply click the gear icon from the side bar of the Mypy tool window.

To change the path to your Mypy executable you can either type the path directly or use the Browse button to open a file selection dialog.

Once you changed the path you should press the Test button to check if the plugin is able to run the executable.

plugin settings screenshot

Inspection severity

By default, Mypy message severity is set to Warning. It is possible to change the severity level by going to Settings/Preferences dialog (CTRL+Alt+S) -> Editor -> Inspections -> Mypy -> Severity:

plugin inspection severity screenshot

Usage

plugin actions screenshot plugin actions screenshot

FAQ

When I click "Check Project/Module/Changes" I only get one error for one file, why?

It is a know issue of mypy: if the validation encounters a blocking error it just bails out completely ignoring the rest of the files. The biggest problem for the plugin is that currently there is no way to know if the check ended normally or because it encountered a blocking error (in the issue ticket there was a suggestion of using --verbose but it does not work, for exampble, for duplicate module naned errors).

How can I prevent the code inspection to run on a specific folder?

The easiest way to ignore a specific folder is to mark it as Excluded from PyCharm/IDEA:

  1. Open PyCharm/IDEA Settings -> your project -> Project structure
  2. Select the directory you want to exclude
  3. Click the Excluded button (red folder icon)

More info here.

The name of the plugin is mypy-pycharm, can I use it also with IntelliJ IDEA?

This plugin officially supports only PyCharm, but it should work also on IntelliJ IDEA if you have the Python Community Edition plugin installed. If it does not work, feel free to open a bug on the issue tracker.

I like this plugin, how can I support it?

The best way to support this plugin is to rate it on the JetBrains Plugin Repository page and to star this project on GitHub. Feedback is always welcome: if you found a bug or would like to suggest a feature, feel free to open an issue on the issue tracker. If your feedback doesn't fall in the previous categories, you can always leave a comment on the Plugin Repository page.

Acknowledgements

If I have seen further it is by standing on the shoulders of Giants - Isaac Newton

A huge thank you to the project CheckStyle-IDEA, which code and architecture I have heavily used when developing this plugin.

License

Copyright 2018 Roberto Leinardi.

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for
additional information regarding copyright ownership.  The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy of
the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
License for the specific language governing permissions and limitations under
the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].