You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A step definition generated in Python from a gherkin step, can require the following refactorings:
Outdent by two spaces
Remove space between the parentheses (()) and the colon (:) beginning the function block
Remove trailing comma and space after context if there's no generated parameters
The unexpected indentation (as flagged by Pylance) prevents execution of Python code; and the remaining errors fail formatters and linters such as black and ruff.
👓 What did you see?
When generating a Python step definition from a gherkin step...
When I eat "<eat>" cucumbers
...the step definition is indented by two spaces and a space is present between the parentheses and the colon of the function declaration.
@when('I eat {string} cucumbers')defstep_when(context, string) :
# This was autogenerated using cucumber syntax.# Please convert to use regular expressions, as Behave does not currently support Cucumber Expressions
Additionally, when generating a Python step definition from a gherkin step containing no parameters...
Then I should have many cucumber
...a trailing comma and space appear after context.
@then('I should have many cucumber')defstep_then(context, ) :
# This was autogenerated using cucumber syntax.# Please convert to use regular expressions, as Behave does not currently support Cucumber Expressions
✅ What did you expect to see?
The step definition is appropriately indented without redundant spaces and commas; as below:
@then('I should have many cucumber')defstep_then(context):
# This was autogenerated using cucumber syntax.# Please convert to use regular expressions, as Behave does not currently support Cucumber Expressions
A step definition generated in Python from a gherkin step, can require the following refactorings:
()
) and the colon (:
) beginning the function blockcontext
if there's no generated parametersThe
unexpected indentation
(as flagged by Pylance) prevents execution of Python code; and the remaining errors fail formatters and linters such as black and ruff.👓 What did you see?
When generating a Python step definition from a gherkin step...
...the step definition is indented by two spaces and a space is present between the parentheses and the colon of the function declaration.
Additionally, when generating a Python step definition from a gherkin step containing no parameters...
Then I should have many cucumber
...a trailing comma and space appear after
context
.✅ What did you expect to see?
The step definition is appropriately indented without redundant spaces and commas; as below:
📦 Which tool/library version are you using?
Version: 1.82.0 (Universal)
Commit: 8b617bd08fd9e3fc94d14adb8d358b56e3f72314
Date: 2023-09-06T22:09:41.364Z (2 mos ago)
Electron: 25.8.0
ElectronBuildId: 23503258
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 20.6.0
Cucumber VSCode Extension: 1.8.0
🔬 How could we reproduce it?
The text was updated successfully, but these errors were encountered: