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

get_url returns different urls calling twice (bug #506) #507

Merged
merged 12 commits into from Jul 7, 2019
Merged

get_url returns different urls calling twice (bug #506) #507

merged 12 commits into from Jul 7, 2019

Conversation

ehooo
Copy link
Contributor

@ehooo ehooo commented Jun 24, 2019

  • Describe the bug
    The function get_url overwrite the info['id'] stored on extension_loader.MANAGER.blacklist_by_id

  • Steps to reproduce the behavior:

In [1]: from bandit.core.docs_utils import get_url                                                                                                                                                                                                                      
In [2]: get_url('B304')                                                                                                                                                                                                                                                 
Out[2]: 'https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b304-b305-ciphers-and-modes'
In [3]: get_url('B304')                                                                                                                                                                                                                                                 
Out[3]: 'https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b304-b305-ciphers-and-modes'
  • Expected behavior
    Call to bid with same bid must return same url

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.

Please also add a better description in your PR message and title.

tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
tests/unit/core/test_docs_util.py Outdated Show resolved Hide resolved
@ehooo ehooo changed the title Fix bug #506 get_url returns different urls calling twice (bug #506) Jun 25, 2019
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.

Looks good

@ericwb ericwb merged commit 610b800 into PyCQA:master Jul 7, 2019
@ericwb ericwb added this to the Release 1.6.3 milestone Dec 6, 2020
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