Skip to content

Commit

Permalink
Clarify unsafe case in RSE102 (#8256)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Oct 26, 2023
1 parent 4ffd4ed commit d211074
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ use crate::checkers::ast::Checker;
/// ## Known problems
/// Parentheses can only be omitted if the exception is a class, as opposed to
/// a function call. This rule isn't always capable of distinguishing between
/// the two. For example, if you define a method `get_exception` that itself
/// returns an exception object, this rule will falsy mark the parentheses
/// in `raise get_exception()` as unnecessary.
/// the two.
///
/// For example, if you import a function `module.get_exception` from another
/// module, and `module.get_exception` returns an exception object, this rule will
/// incorrectly mark the parentheses in `raise module.get_exception()` as
/// unnecessary.
///
/// ## Example
/// ```python
Expand Down

0 comments on commit d211074

Please sign in to comment.