flake8-bugbear: Codes B301-B306 conflict with openstack/bandit (via. flake8-bandit)
Similar situation to #20, there are conflicts across codes B301-B306.
https://github.com/openstack/bandit:
The following tests were discovered and loaded: ... B301 pickle B302 marshal B303 md5 B304 ciphers B305 cipher_modes B306 mktemp_q
- https://github.com/tylerwince/flake8-bandit is “a flake8 wrapper around [bandit]”
In my situation:
- When both are installed,
banditis still available whilebugbearis deactivated - If I uninstall
bandit,bugbearis activated and works as expected
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (3 by maintainers)
@ambv You hit the nail on the head about Vim Syntastic:
And I was mistaken when I said:
I’ve since tried to fix the Flake8 syntax checker used by Syntastic and I’ve filed a bug on their issue tracker.
No need to respond; just giving credit where it’s due.
@tylerwince Thanks for that. Upgraded to
1.0.2and all working well.@ambv Since we’ve got a resolution, I’m closing this issue. Thanks for the feedback above.
@tylerwince Something like the following:
setup.py:flake8_bandit.py:Sample output:
banditcode is displayed in text of the error@tylerwince Appreciate the prompt response.
This is incredibly naive, since I’m unfamiliar with the internals of Flake8 (see my wonderful workaround above) but is there any mileage in simply using something like
BANas the entry point for allbanditcodes? Something like:That way, nothing would have to be done for either of the well-established
bugbearandbanditprojects. The coercion would be done withinflake8-bandit, with a simple conversion ofB***toBAN***.I’ve actually had a quick go at the above and it seems to hold together. However, I don’t know how that works for users who want the exact
banditcodes.