Skip to content

Conversation

@arashbm
Copy link

@arashbm arashbm commented Dec 12, 2023

Feature or Bugfix

  • Bugfix

Purpose

  • Fixes python signature regex to successfully parse simultaneous annotations of function and return type.

Detail

Python domain fails to match functions where both function name and return type have type annotation, e.g.

hello[int](a, b, c) -> world[int]

The fix comes down to an overly eager .* in the regex that matches everything from the first [ to the last ] in one fell swoop.

I'm not 100% sure if the two new test cases are in the right place but if not, let me know and I'll move them.

@picnixz
Copy link
Member

picnixz commented Dec 24, 2023

Ok, this one is propably my bad. Before reviewing it-, I want you to complete the tests that I wrote for PEP 695 (

def test_function_pep_695(app):
and later) and check whether they still pass with a return value because I totally missed that case.

I really don't like regexes like that because we always miss some cases...

Note: I'm only quickly available for a week or so before going off until mid february.

Note 2: Can you open a dedicated issue also?

@picnixz picnixz added the awaiting:response Waiting for a response from the author of this issue label Feb 25, 2024
@AA-Turner
Copy link
Member

This seems important to support.

@AA-Turner AA-Turner added this to the 8.2.0 milestone Jan 26, 2025
@AA-Turner
Copy link
Member

@picnixz do you want to take over this PR?

@picnixz
Copy link
Member

picnixz commented Jan 27, 2025

I'm travelling for the next two weeks but I can take over it once I'm back!

@AA-Turner AA-Turner modified the milestones: 8.2.0, 8.x Feb 3, 2025
@picnixz
Copy link
Member

picnixz commented Feb 11, 2025

Superseded by #13328.

@picnixz picnixz closed this Feb 11, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

awaiting:response Waiting for a response from the author of this issue domains:py

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants