Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse type alias containing lambda #3948

Closed
JelleZijlstra opened this issue Oct 16, 2023 · 0 comments · Fixed by #3949
Closed

Fails to parse type alias containing lambda #3948

JelleZijlstra opened this issue Oct 16, 2023 · 0 comments · Fixed by #3949
Labels
C: parser How we parse code. Or fail to parse it. T: bug Something isn't working

Comments

@JelleZijlstra
Copy link
Collaborator

% python -m black -c 'type Alias[T] = lambda: T'       
type Alias[T] = lambda: T
error: cannot format <string>: Cannot parse: 1:16: type Alias[T] = lambda: T
% python -m black --version                     
python -m black, 23.9.2.dev39+g3208b76.d20231016 (compiled: no)
Python (CPython) 3.12.0
@JelleZijlstra JelleZijlstra added T: bug Something isn't working C: parser How we parse code. Or fail to parse it. labels Oct 16, 2023
JelleZijlstra added a commit to JelleZijlstra/black that referenced this issue Oct 16, 2023
hauntsaninja pushed a commit that referenced this issue Oct 16, 2023
JelleZijlstra added a commit to JelleZijlstra/black that referenced this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: parser How we parse code. Or fail to parse it. T: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant