diff --git a/crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_isinstance.rs b/crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_isinstance.rs index af3e40687a7c4a..4849dda1854915 100644 --- a/crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_isinstance.rs +++ b/crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_isinstance.rs @@ -39,9 +39,13 @@ impl CallKind { /// /// ## Why is this bad? /// Since Python 3.10, `isinstance` and `issubclass` can be passed a -/// `|`-separated union of types, which is more concise and consistent +/// `|`-separated union of types, which is consistent /// with the union operator introduced in [PEP 604]. /// +/// Note that this results in slower code. Ignore this rule if the +/// performance of an `isinstance` or `issubclass` check is a +/// concern, e.g., in a hot loop. +/// /// ## Example /// ```python /// isinstance(x, (int, float))