mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
Document link between import-outside-top-level (PLC0415)
and lint.flake8-tidy-imports.banned-module-level-imports
(#18733)
<!--
Thank you for contributing to Ruff/ty! To help us out with reviewing,
please consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title? (Please prefix
with `[ty]` for ty pull
requests.)
- Does this pull request include references to any relevant issues?
-->
## Summary
As mentioned in
https://github.com/astral-sh/ruff/issues/18728#issuecomment-2981330666
CC @ntBre


## Test Plan
Run the docs locally as per
a2cd6df429/CONTRIBUTING.md (mkdocs)
---------
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
This commit is contained in:
parent
2589a2938e
commit
4f36f0677f
3 changed files with 10 additions and 2 deletions
|
@ -1996,7 +1996,8 @@ pub struct Flake8TidyImportsOptions {
|
|||
|
||||
/// List of specific modules that may not be imported at module level, and should instead be
|
||||
/// imported lazily (e.g., within a function definition, or an `if TYPE_CHECKING:`
|
||||
/// block, or some other nested context).
|
||||
/// block, or some other nested context). This also affects the rule `import-outside-top-level`
|
||||
/// if `banned-module-level-imports` is enabled.
|
||||
#[option(
|
||||
default = r#"[]"#,
|
||||
value_type = r#"list[str]"#,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue