Intellij IDEA Plugin version: 1.1.0, Sourcery version: 1.1.0
I noticed that the 'require-return-annotation' rule is applied to files test_*.py but should not be.
I noticed that when I put this rule in the sourcery.yaml file and add the include field with *.py then it works! (the rule is not applied to test_*.py files). Without include the rule is incorrecly applied to test_*.py files.
This works:
rules:
- id: require-return-annotation
pattern: |
def ${name}(...) -> !!!:
...
condition: not name.starts_with("_")
paths:
include:
- '*.py'
exclude:
- 'test_*.py'
- '*_test.py'
This does not work:
rules:
- id: require-return-annotation
pattern: |
def ${name}(...) -> !!!:
...
condition: not name.starts_with("_")
paths:
exclude:
- 'test_*.py'
- '*_test.py'
Intellij IDEA Plugin version: 1.1.0, Sourcery version: 1.1.0
I noticed that the 'require-return-annotation' rule is applied to files
test_*.pybut should not be.I noticed that when I put this rule in the
sourcery.yamlfile and add theincludefield with*.pythen it works! (the rule is not applied totest_*.pyfiles). Withoutincludethe rule is incorrecly applied totest_*.pyfiles.This works:
This does not work: