Skip to content

Commit

Permalink
feat: add pycln
Browse files Browse the repository at this point in the history
feat: add pycln
  • Loading branch information
Quitlox committed Dec 29, 2024
1 parent 9180320 commit 887fbbd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ You can view this list in vim with `:help conform-formatters`
- [prettypst](https://github.com/antonWetzel/prettypst) - Formatter for Typst.
- [puppet-lint](https://github.com/puppetlabs/puppet-lint) - Check that your Puppet manifests conform to the style guide.
- [purs-tidy](https://github.com/natefaubion/purescript-tidy) - A syntax tidy-upper for PureScript.
- [pycln](https://github.com/hadialqattan/pycln) - A Python formatter for finding and removing unused import statements.
- [pyink](https://github.com/google/pyink) - A Python formatter, forked from Black with a few different formatting behaviors.
- [python-ly](https://github.com/frescobaldi/python-ly) - A Python package and commandline tool to manipulate LilyPond files.
- [reorder-python-imports](https://github.com/asottile/reorder-python-imports) - Rewrites source to reorder python imports
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ FORMATTERS *conform-formatter
`prettypst` - Formatter for Typst.
`puppet-lint` - Check that your Puppet manifests conform to the style guide.
`purs-tidy` - A syntax tidy-upper for PureScript.
`pycln` - A Python formatter for finding and removing unused import statements.
`pyink` - A Python formatter, forked from Black with a few different formatting
behaviors.
`python-ly` - A Python package and commandline tool to manipulate LilyPond
Expand Down
18 changes: 18 additions & 0 deletions lua/conform/formatters/pycln.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
local util = require("conform.util")
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://github.com/hadialqattan/pycln",
description = "A Python formatter for finding and removing unused import statements.",
},
command = "pycln",
args = {
"--silence",
"-a",
"-",
},
cwd = util.root_file({
"pyproject.toml",
"setup.cfg",
}),
}

0 comments on commit 887fbbd

Please sign in to comment.