Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/ruff_linter/resources/test/fixtures/pycodestyle/E25.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,15 @@ def pep_696_good_method[A = int, B: object = str, C:object = memoryview](self):

# https://github.com/astral-sh/ruff/issues/15202
type Coro[T: object = Any] = Coroutine[None, None, T]


# https://github.com/astral-sh/ruff/issues/15339
type A = Annotated[
str, Foo(lorem='ipsum')
]
type B = Annotated[
int, lambda a=1: ...
]
type C = Annotated[
int, lambda a: ..., lambda a=1: ...
]
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ impl DefinitionState {
Self::NotInDefinition => return,
};
match token_kind {
TokenKind::Lpar if type_params_state_mut.before_type_params() => {
TokenKind::Lpar | TokenKind::Equal if type_params_state_mut.before_type_params() => {
*type_params_state_mut = TypeParamsState::TypeParamsEnded;
}
TokenKind::Lsqb => match type_params_state_mut {
Expand Down
Loading