Registry / serialization / reformat-gherkin

reformat-gherkin

JSON →
library3.0.1pypypiunverified

Formatter for Gherkin language. v3.0.1 supports Python >=3.7,<4.0. Releases are irregular.

pip install reformat-gherkin
INSTALL
IMPORT
SIG · REFORMAT-GHERKIN
R
reformat-gherkin
serializationpythonv3.0.1
Install
3.1s avg
Import
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 25MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.1s · import 0.000s · 26MB
23MB installed
● package 23MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

format_feature
from reformat_gherkin import format_feature
from reformat_gherkin import format_feature

Format a Gherkin feature string. Also available as CLI: `reformat-gherkin --help`

from reformat_gherkin import format_feature feature_text = """Feature: Example Scenario: Test Given a step """ formatted = format_feature(feature_text) print(formatted) # Or using stdin: echo '...' | reformat-gherkin
reformat-gherkin --version
Debug
Known issues
breakingv3.0.0 upgraded gherkin-official to 24.0.0 which may change parsing behavior. Back up feature files before reformatting.
fix
Test reformatting on a subset of files first. Use v2.2.1 if compatibility is critical.
affects: >=3.0.0
breakingv3.0.0 fixed escaping of triple backticks in docstrings. Previously triple backticks were not escaped; now they are escaped to \`\`\`. This may change output for docstrings containing backticks.
fix
Review feature files with triple backticks in docstrings; expected output now escapes them.
affects: >=3.0.0
deprecatedPython 3.6 support was dropped in v2.0.2. Python 3.7+ required.
fix
Upgrade Python to 3.7+.
affects: >=2.0.2
gotchaThe CLI option `--indent` accepts number of spaces, but the default is 2. Inconsistent indentation in input may be normalized unexpectedly.
fix
Explicitly pass `--indent` with desired value, e.g. `--indent 4`.
affects: all
gotchacattrs has breaking changes that affect reformat-gherkin (fixed in v3.0.1). Using older versions with newer cattrs may cause errors.
fix
Upgrade to reformat-gherkin >=3.0.1 or pin cattrs to compatible version.
affects: <3.0.1
Upgrade
Version history
3.0.1latest on PyPI · released Oct 4, 2022
Audit
Dependencies
gherkin-officialrequiredcore parsing library; major version updates can change formatting behavior
clickrequiredCLI interface
PyYAMLrequiredconfiguration reading
attrsrequireddata classes; breaking changes in v22+ required fixes
cattrsrequiredserialization; known for breaking changes that affect reformat-gherkin
Agent activity
14 hits · last 30 days
node
14
Resources
reformat-gherkin — pip install reformat-gherkin · libregistry