Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Proposal: Plugin "assert_used" config-skip snippet #695

Merged
merged 3 commits into from Jul 8, 2022

Conversation

marianomartinelli
Copy link
Contributor

@marianomartinelli marianomartinelli commented Mar 6, 2021

I want to propose a little but hopefully useful change (in my opinion) to the docs about B101: assert_used config plugin.

I struggled a while trying to understand why the skip config snippet wasn't working at all in my project, and it turns out that, as my tests were in nested directories, a wildcard was needed as a prefix for the following rule: 'test_*.py'.

Also, as this plugin's skip rule is mainly used for test files, I believe its worth having a working example for newcomers to bandit.
In most cases, tests won't be on the root directory of the project, that's why I propose this change, as it goes hand by hand with real test-scaffolding scenarios.

Thanks for this amazing project!

Copy link
Member

@ericwb ericwb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericwb ericwb enabled auto-merge (squash) July 8, 2022 02:27
@ericwb ericwb removed the request for review from ghugo July 8, 2022 02:28
@ericwb ericwb merged commit f909a7d into PyCQA:main Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants