PyCQA / bandit

Bandit is a tool designed to find common security issues in Python code.
https://bandit.readthedocs.io
Apache License 2.0
6.52k stars 612 forks source link

`automodule` tag not generating the doc properly anymore #921

Closed actionless closed 2 years ago

actionless commented 2 years ago

Describe the bug

For example:

source file look the same: https://github.com/PyCQA/bandit/blob/main/doc/source/blacklists/blacklist_imports.rst https://github.com/PyCQA/bandit/blob/1.7.4/doc/source/blacklists/blacklist_imports.rst

But doc generates properly for the release version: https://bandit.readthedocs.io/en/1.7.4/blacklists/blacklist_imports.html

But not for the latest git version: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html

Reproduction steps

not applicable

Expected behavior

not applicable

Bandit version

1.7.4 (Default)

Python version

3.10 (Default)

Additional context

No response

mportesdev commented 2 years ago

Possible duplicate of #892 where I already proposed a solution. However the docs build workflow is not tracked in VCS (afaik) so I can't open a PR for this.

@ericwb Can you please look into this? If you have access to the readthedocs account, can you update the workflow such that -r requirements.txt is inserted before -r test-requirements.txt in this line:

/home/docs/checkouts/readthedocs.org/user_builds/bandit/envs/latest/bin/python -m pip install --exists-action=w --no-cache-dir -r test-requirements.txt

(it's the 7th command of the workflow)

Thanks.

ericwb commented 2 years ago

Should be fixed now. I changed the requirements setting to point to requirements.txt instead of test-requirements.txt in the ReadTheDocs config.

actionless commented 2 years ago

thanks, looks well now 👍