Code autoformatter for Robot Framework
Project description
Robotidy
Introduction
Robotidy is a tool for autoformatting Robot Framework code.
It is spiritual descendant of Robot Framework's internal robot.tidy package.
Documentation
Full documentation available here. :open_book:
Requirements
Python 3.7+ :snake: and Robot Framework 4.0.0+ :robot:.
Installation
You can install Robotidy simply by running:
pip install robotframework-tidy
Usage
Call robotidy with path(s) to file/directory with robot files:
robotidy tests
robotidy test.robot
robotidy tests/resources test.robot
All command line options can be displayed in help message by executing:
robotidy --help
Example
Ugly before transforming with robotidy:
*** Settings ***
Force Tags tags tag2
Library Collections
Resource important.robot
Library MyCustomLibrary.py
Test Setup Setup Keyword
*** test case*
Test1
[ teardown] Teardown Keyword
Keyword
FOR ${var} IN RANGE 10
Run Keyword If ${var}>5 Other Keyword
END
*** Variables ***
${var}= 2
${bit_longer} 10
${var2} a
... b
*** Keywords ***
A lot prettier code after:
*** Settings ***
Library Collections
Library MyCustomLibrary.py
Resource important.robot
Test Setup Setup Keyword
Force Tags tags tag2
*** Variables ***
${var} 2
${bit_longer} 10
${var2} a
... b
*** Test Cases ***
Test1
Keyword
FOR ${var} IN RANGE 10
IF ${var}>5
Other Keyword
END
END
[Teardown] Teardown Keyword
Project details
Release history Release notifications | RSS feed
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 robotframework-tidy-1.5.1.tar.gz
.
File metadata
- Download URL: robotframework-tidy-1.5.1.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dffbd592fbddc5abd5ce1207221a6f82f43c7ade4b5528c007822866d36bd0e |
|
MD5 | 01098262551ddecbab61c816c36bb7cd |
|
BLAKE2b-256 | 2d9b345aecd1865e11cf317d5476300b970c4823352d0f54f939eda699422e68 |
Provenance
File details
Details for the file robotframework_tidy-1.5.1-py3-none-any.whl
.
File metadata
- Download URL: robotframework_tidy-1.5.1-py3-none-any.whl
- Upload date:
- Size: 43.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 601186e09273bc986b62f8f054e2513e2b8faa1ac23f8ace5c8a128636674ca4 |
|
MD5 | 77725de6e38a86250e777600ccfce120 |
|
BLAKE2b-256 | c1a4031d6da2364298009935f9d2be8965ff7057af6feddb3414cecfbf525b4d |