Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mflova/flake8-numba
Flake8 plugin that performs multiple checks over numba package usage
https://github.com/mflova/flake8-numba
Last synced: 3 months ago
JSON representation
Flake8 plugin that performs multiple checks over numba package usage
- Host: GitHub
- URL: https://github.com/mflova/flake8-numba
- Owner: mflova
- Created: 2023-06-21T09:08:00.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2023-07-23T12:14:50.000Z (over 1 year ago)
- Last Synced: 2024-08-03T03:04:37.261Z (6 months ago)
- Language: Python
- Homepage:
- Size: 109 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
- awesome-flake8-extensions - flake8-numba - Plugin that facilitates code development with `numba` package. (Library-specific checks)
README
# flake8-numba
Improve your Python development experience with flake8-numba. This plugin integrates with Flake8 to provide
comprehensive code analysis for projects that make use of numba. When working with numba, many errors are not
discovered until the code is run. However, many of these issues can be perfectly caught by performing some basic
syntactical analysis. This tool helps you catch potential errors and enhance code quality effortlessly.## Installation
Make sure that you have `flake8` installed. Then:
```
pip install flake8-numba
```After it calling `flake8` will include all rules defined by this plugin.
## Rules
Some examples are:
```python
@vectorize([float64(float64, float64)])
def f(x, y):
return x + y, 2 # ERROR: only 1 value can be returned
```or:
```python
# ERROR: Dimensions mismatch (second argument at left is an array but an scalar at right)
@guvectorize([(float32, float32[:], float32)], "(), () -> ()")
def func(...) -> None:
...
```All available rules can be read in `RULES.md`