Package: python-lemming
LemmingLemmingis a tool for formatting and linting your code. With Lemming, everyone will use the same formatters and linters, with the same version.InstallationUse the package managerpipto install Lemming.Need more help?pipinstallpython-lemmingRequirementsLemming requires Python 3.7Usage1. Create the configLemming's config lives in these places:in the.lemming.tomlfilein thepyproject.tomlfilePlease note, that there must be alemmingortool.lemmingkey in the config file.The config looks like this:fail_fast=false# OPTIONAL, whether or not immediately quit in case of an error[[formatters]]name="some_example"# OPTIONAL, used to identify this formatter. Defaults to packages[0]packages=["example"]# REQUIRED, the package(s) to install with pip (might include versions with "==x.y.z")format_command="{pyexe} -m example {path}"# REQUIRED, the command to run to format the code ({pyexe} will be replaced with the python executable, {path} with the path passed to Lemming (usually the current working directory: "."))check_command="{pyexe} -m example --check {path}"# OPTIONAL, the command to run to check the code (stuff will be replaced just like in format_command)allow_nonzero_on_format=true# OPTIONAL, if true it is allowed for the format_command to return a non-zero exit status[[linters]]name="other_example"# OPTIONAL, used to identify this linter. Defaults to packages[0]packages=["example"]# REQUIRED, same as for formatterscommand="{pyexe} -m example {path}"# REQUIRED, the command to run to lint the code (stuff will be replaced just like in format_command)run_first=true# OPTIONAL, if true this linter will be ran BEFORE formatters, and other linters. Defaults to false.2. Run LemmingAfterinstallingLemming, runlemming{format,check}.If you choose format, theformat_commands will be ran, but if you choose check, thecheck_commands will be ran. Linters will be ran in both cases.You can also use Lemming as a GitHub workflow, likethis.CLI usageUsage:lemming[OPTIONS]COMMAND[ARGS]...

╭─Options──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│--version-VPrinttheversionofLemmingandexit.│
│--install-completion[bash|zsh|fish|powershell|pwsh]Installcompletionforthespecifiedshell.[default:None]│
│--show-completion[bash|zsh|fish|powershell|pwsh]Showcompletionforthespecifiedshell,tocopyitorcustomizetheinstallation.[default:None]│
│--helpShowthismessageandexit.│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─Commands─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│checkChecktheformattingofyourcodeandrunlinters.│
│formatFormatyourcodeandrunlinters.│
│pre-commitInstallapre-commitgithookwhichwillrunLemming.│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯CheckUsage:lemmingcheck[OPTIONS]PATHS...Checktheformattingofyourcodeandrunlinters.

╭─Arguments─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│*pathsPATHS...[default:None][required]│
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─Options───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│--quiet-commands,--qcIfpassedtheoutputoftheformattersandlinterswillbehidden.│
│--quiet-pip,--qpIfpassedtheoutputofpipwillbehidden.│
│--verbose-vWhenpassedthelogger's threshold will be decreased by 10 (may be passed multiple times)  ││ --quiet                -q            When passed the logger'sthresholdwillbeincreasedby10(maybepassedmultipletimes)│
│--configFILETheconfigfiletouse[default:None]│
│--onlyTEXTOnlyruntheseformatters/linters(maybepassedmultipletimes)[default:None]│
│--helpShowthismessageandexit.│
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯FormatUsage:lemmingformat[OPTIONS]PATHS...Formatyourcodeandrunlinters.

╭─Arguments─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│*pathsPATHS...[default:None][required]│
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─Options───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│--quiet-commands,--qcIfpassedtheoutputoftheformattersandlinterswillbehidden.│
│--quiet-pip,--qpIfpassedtheoutputofpipwillbehidden.│
│--verbose-vWhenpassedthelogger's threshold will be decreased by 10 (may be passed multiple times)  ││ --quiet                -q            When passed the logger'sthresholdwillbeincreasedby10(maybepassedmultipletimes)│
│--configFILETheconfigfiletouse.[default:None]│
│--onlyTEXTOnlyruntheseformatters/linters(maybepassedmultipletimes)[default:None]│
│--helpShowthismessageandexit.│
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯Pre-commitUsage:lemmingpre-commit[OPTIONS]Installapre-commitgithookwhichwillrunLemming.

╭─Options──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│--git-repositoryDIRECTORYTherootdirectoryofthegitrepositorytouse.Defaultstothecurrentworkingdirectory.[default:(dynamic)]│
│--verbose-vWhenpassedthelogger's threshold will be decreased by 10 (may be passed multiple times)                             ││ --quiet           -q                 When passed the logger'sthresholdwillbeincreasedby10(maybepassedmultipletimes)│
│--helpShowthismessageandexit.│
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯SupportQuestions should be asked in theDiscussions tab.Feature requests and bug reports should be reported in theIssues tab.Security vulnerabilities should be reported as described in ourSecurity policy(in theSECURITY.mdfile).ContributingPull requestsare welcome. For major changes, pleaseopen an issue firstto discuss what you would like to change.Please make sure to add entries tothe changelog.For more information, please read thecontributing guidelines.Authors and acknowledgmentsA list of nice people who helped this project can be found in theCONTRIBUTORS file.LicenseGNU GPLv3+