-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Please provide more information to help us understand the issue:
The standard idiom for behave steps is to reuse the step_impl() function name for each step definition. Since step functions are looked up through a separate function this makes sense.
With mypy it seems impossible to supress the messages that occur
features/steps/add.py:11: error: Name 'step_impl' already defined on line 6
features/steps/add.py:16: error: Name 'step_impl' already defined on line 6
features/steps/add.py:21: error: Name 'step_impl' already defined on line 6
This means that code which is otherwise correct fails.
The actual behavior can be seen with the following commands
- git clone -b pass_mypy git@github.com:mikedlr/behave_minimal_example.git
- cd behave_minimal_example/
- mypy features/steps/add.py
which outputs:
features/steps/add.py:11: error: Name 'step_impl' already defined on line 6
features/steps/add.py:16: error: Name 'step_impl' already defined on line 6
features/steps/add.py:21: error: Name 'step_impl' already defined on line 6
the expected behavior would be to show no errors.
$ python --version
Python 3.6.7
$ mypy --version
mypy 0.660
Metadata
Metadata
Assignees
Labels
No labels