Forrest logo
tool overview
On this page you find all important commands for the CLI tool snakefmt. If the command you are looking for is missing please ask our AI.

snakefmt

Snakefmt is a command line tool designed for formatting Python code in a consistent and standardized manner. It is based on the black code formatter, but with some additional features tailored specifically for snake_case naming conventions. One of the primary objectives of snakefmt is to enforce a consistent coding style across Python projects, ultimately improving code readability and maintainability. It automatically formats Python code by reorganizing the structure and layout to adhere to the snake_case naming convention. Snakefmt supports various options, allowing users to customize the formatting process according to their preferences and project requirements. It can be integrated into various IDEs, text editors, and build systems to ensure automatic formatting during development or as part of continuous integration workflows. By using snakefmt, programmers can save time and effort spent on manual code formatting, as well as avoid potential conflicts arising from inconsistent styles among team members. Snakefmt also provides a comprehensive set of command line flags and arguments, enabling users to fine-tune the formatting process and handle specific edge cases effectively. It offers features such as preserving the leading comments, working with specific file patterns, and displaying the output diff without modifying the actual source code. Overall, snakefmt is a powerful tool that promotes code consistency and readability for Python projects that follow the snake_case naming convention.

List of commands for snakefmt:

  • snakefmt:tldr:4f474 snakefmt: Display the changes that would be performed without performing them (dry-run).
    $ snakefmt --diff ${path-to-snakefile}
    try on your machine
    explain this command
  • snakefmt:tldr:4f773 snakefmt: Format a file using a specific maximum line length.
    $ snakefmt --line-length ${100} ${path-to-snakefile}
    try on your machine
    explain this command
  • snakefmt:tldr:ab294 snakefmt: Format a specific Snakefile.
    $ snakefmt ${path-to-snakefile}
    try on your machine
    explain this command
  • snakefmt:tldr:e7e75 snakefmt: Format a file using a specific configuration file.
    $ snakefmt --config ${path-to-config-toml} ${path-to-snakefile}
    try on your machine
    explain this command
tool overview