mirror of https://github.com/astral-sh/ruff
[`flake8-bandit`] `request-without-timeout` should warn for `requests.request` (#11548)
## Summary Update [S113](https://docs.astral.sh/ruff/rules/request-without-timeout/) to also warns for missing timeout on when calling `requests.request`
This commit is contained in:
parent
16acd4913f
commit
4a305588e9
|
|
@ -58,7 +58,7 @@ pub(crate) fn request_without_timeout(checker: &mut Checker, call: &ast::ExprCal
|
||||||
qualified_name.segments(),
|
qualified_name.segments(),
|
||||||
[
|
[
|
||||||
"requests",
|
"requests",
|
||||||
"get" | "options" | "head" | "post" | "put" | "patch" | "delete"
|
"get" | "options" | "head" | "post" | "put" | "patch" | "delete" | "request"
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ if TYPE_CHECKING:
|
||||||
Project,
|
Project,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Matches lines that are summaries rather than diagnostics
|
# Matches lines that are summaries rather than diagnostics
|
||||||
CHECK_SUMMARY_LINE_RE = re.compile(r"^(Found \d+ error.*)|(.* fixable with .*)$")
|
CHECK_SUMMARY_LINE_RE = re.compile(r"^(Found \d+ error.*)|(.* fixable with .*)$")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue