Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gerardroche/sublime-mypy-stubs
Sublime Text mypy stubs
https://github.com/gerardroche/sublime-mypy-stubs
mypy sublime-text
Last synced: 2 months ago
JSON representation
Sublime Text mypy stubs
- Host: GitHub
- URL: https://github.com/gerardroche/sublime-mypy-stubs
- Owner: gerardroche
- Created: 2018-01-28T09:05:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-14T21:06:40.000Z (11 months ago)
- Last Synced: 2024-02-14T22:24:49.281Z (11 months ago)
- Topics: mypy, sublime-text
- Language: Python
- Homepage: https://blog.gerardroche.com
- Size: 54.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sublime Text mypy stubs
## Install
Just clone it to wherever you like, example:
```
$ git clone https://github.com/gerardroche/sublime-mypy-stubs.git ~/sublime-mypy-stubs
```## Running mypy
To run mypy for a package using the stubs, either CD into package directory:
```
MYPYPATH="$HOME/sublime-mypy-stubs:../../Packages" python3 -m mypy --show-error-codes ../PackageName
```Or if the package was installed via Package Control, rather than cloned directory into the Packages directory, CD into the Packages directory:
```
MYPYPATH="$HOME/sublime-mypy-stubs:../../Packages" python3 -m mypy --show-error-codes -p PackageName
```Bash function
```sh
mypysubl() {
MYPYPATH="$HOME/sublime-mypy-stubs:../../Packages" python3 -m mypy --show-error-codes $@
}
```With this bash function you can run `mypysubl ../PackageName` or `mypysubl -p PackageName`.
## SublimeLinter
In your Sublime Linter mypy settings set the `MYPYPATH` path.
```json
{
"linters": {
"mypy": {
"env": {
"MYPYPATH": "~/sublime-mypy-stubs"
},
"args": [],
"disable": false,
"excludes": [],
"executable": "~/.local/bin/mypy",
}
}
}
```