No project description provided
Project description
Yet another way to run Python linters
I have a specific setup on my local machine and prefer to run flake8
& mypy
in a terminal window on my second display. This package serves to run a list of linters each time a file with a specified extension is changed.
Compatibility
- Python 3.10+
Linters
This package does not include any linters as dependencies, allowing you to customize the configuration locally and run your preferred set of tools. You need to specify the linters you want to use in your poetry
or pip
dependencies. Additionally, you must provide a command string for each linter in the local configuration file. I've tested it with the following:
- MyPy 1.8+
Configuration
This app is configurable and comes with a default config.yaml
located in the source code folder. If you create a config file in your home directory, it will override the default settings using the same logic as updating one dictionary with another.
Default Config
By default, the configuration includes no linters. You can override this in your local configuration to add them. You can adjust any linter parameters, but be sure to include the {path}
format parameter, which works the same way as Python's .format()
function. The default config.yaml
contains two commented lines with examples of how the linter command should be formatted.
theme: 'frame' # raw | frame
files:
- '*.py'
linters:
# - 'flake8 {path}'
# - 'mypy {path}'
Local Config
The path to your custom config file is:
Path.home() / '.config/auto_lint/config.yaml'
On a Linux system, it would look like this:
/home/<username>/.config/auto_lint/config.yaml
Example
You need to specify at least one linter. Here are two that I'm using:
linters:
- 'flake8 {path}'
- 'mypy {path}'
CLI
Currently available commands:
poetry run lintify <dir_to_watch>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lintify-0.0.1.tar.gz
.
File metadata
- Download URL: lintify-0.0.1.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.2 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87940f514af14d5a6541a182855836c72ea21e78af1f6f9f49cd2a1f13e26666 |
|
MD5 | 146652051c6e276b6195331058171fae |
|
BLAKE2b-256 | f288ef3ad1a304605989f5e3df71333e55c5ee7d124f9ed295e9249d6acd4084 |
File details
Details for the file lintify-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: lintify-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.2 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da5ecaa2912e1a388caee477dcdff7f6e93bb223feb5a9b261a3d381681529c2 |
|
MD5 | 3888df2b2114529fdd5e447425841541 |
|
BLAKE2b-256 | bb7177181b7190b1a9dbda2bb5c06d5b7c69137d4d083ce2d0cdf8bbfde1b372 |