summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorYining <zhang.yining@gmail.com>2023-01-27 12:24:18 +1100
committerGitHub <noreply@github.com>2023-01-27 10:24:18 +0900
commitb6f6d84c25169744f43db6d0ee296ee44eb78d91 (patch)
tree7df3bc78af81f76a7ed2813f90ccae96a8d0e16b /doc
parent26c79014f52b0306ec619666bc73766f22621edb (diff)
downloadale-b6f6d84c25169744f43db6d0ee296ee44eb78d91.zip
add: pycln as a python linter and fixer (#4415)
this commit adds pycln as a Python linter and fixer, together with some tests and documentation. It addresses #4340 pycln repo: https://github.com/hadialqattan/pycln
Diffstat (limited to 'doc')
-rw-r--r--doc/ale-python.txt72
-rw-r--r--doc/ale-supported-languages-and-tools.txt1
-rw-r--r--doc/ale.txt1
3 files changed, 74 insertions, 0 deletions
diff --git a/doc/ale-python.txt b/doc/ale-python.txt
index 07f54db8..aad64b1d 100644
--- a/doc/ale-python.txt
+++ b/doc/ale-python.txt
@@ -581,6 +581,78 @@ g:ale_python_prospector_auto_poetry *g:ale_python_prospector_auto_poetry*
===============================================================================
+pycln *ale-python-pycln*
+
+g:ale_python_pycln_change_directory *g:ale_python_pycln_change_directory*
+ *b:ale_python_pycln_change_directory*
+ Type: |Number|
+ Default: `1`
+
+ If set to `1`, `pycln` will be run from a detected project root, per
+ |ale-python-root|. if set to `0` or no project root detected,
+ `pycln` will be run from the buffer's directory.
+
+
+g:ale_python_pycln_executable *g:ale_python_pycln_executable*
+ *b:ale_python_pycln_executable*
+ Type: |String|
+ Default: `'pycln'`
+
+ See |ale-integrations-local-executables|
+
+ Set this to `'pipenv'` to invoke `'pipenv` `run` `pycln'`.
+ Set this to `'poetry'` to invoke `'poetry` `run` `pycln'`.
+
+
+g:ale_python_pycln_options *g:ale_python_pycln_options*
+ *b:ale_python_pycln_options*
+ Type: |String|
+ Default: `''`
+
+ This variable can be changed to add command-line arguments to the pycln
+ invocation.
+
+ For example, to select/enable and/or disable some error codes,
+ you may want to set >
+ let g:ale_python_pycln_options = '--expand-stars'
+
+
+g:ale_python_pycln_config_file *g:ale_python_pycln_config_file*
+ *b:ale_python_pycln_config_file*
+ Type: |String|
+ Default: `''`
+
+ Use this variable to set the configuration file.
+ If `'--config' ` is found in the |g:ale_python_pycln_options|, then that
+ option value will override the value in this variable.
+
+g:ale_python_pycln_use_global *g:ale_python_pycln_use_global*
+ *b:ale_python_pycln_use_global*
+ Type: |Number|
+ Default: `get(g:, 'ale_use_global_executables', 0)`
+
+ See |ale-integrations-local-executables|
+
+
+g:ale_python_pycln_auto_pipenv *g:ale_python_pycln_auto_pipenv*
+ *b:ale_python_pycln_auto_pipenv*
+ Type: |Number|
+ Default: `0`
+
+ Detect whether the file is inside a pipenv, and set the executable to `pipenv`
+ if true. This is overridden by a manually-set executable.
+
+
+g:ale_python_pycln_auto_poetry *g:ale_python_pycln_auto_poetry*
+ *b:ale_python_pycln_auto_poetry*
+ Type: |Number|
+ Default: `0`
+
+ Detect whether the file is inside a poetry, and set the executable to `poetry`
+ if true. This is overridden by a manually-set executable.
+
+
+===============================================================================
pycodestyle *ale-python-pycodestyle*
g:ale_python_pycodestyle_executable *g:ale_python_pycodestyle_executable*
diff --git a/doc/ale-supported-languages-and-tools.txt b/doc/ale-supported-languages-and-tools.txt
index 4edc10c0..71b9c12d 100644
--- a/doc/ale-supported-languages-and-tools.txt
+++ b/doc/ale-supported-languages-and-tools.txt
@@ -481,6 +481,7 @@ Notes:
* `isort`
* `mypy`
* `prospector`!!
+ * `pycln`
* `pycodestyle`
* `pydocstyle`
* `pyflakes`
diff --git a/doc/ale.txt b/doc/ale.txt
index 949ceae0..2876b235 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -3169,6 +3169,7 @@ documented in additional help files.
isort.................................|ale-python-isort|
mypy..................................|ale-python-mypy|
prospector............................|ale-python-prospector|
+ pycln.................................|ale-python-pycln|
pycodestyle...........................|ale-python-pycodestyle|
pydocstyle............................|ale-python-pydocstyle|
pyflakes..............................|ale-python-pyflakes|