Draft: POC Detect empty Python function
What does this MR do and why?
Detect empty Python function from prefix and suffix code.
Since there are no "closing bracket" in Python, we can't use it as an anchor to check whether a function is empty. Instead, we can check several conditions to ensure a function is empty
- A line above cursor is a function definition AND the there is no code below
- A line above cursor is a function definition AND the line below cursor is also a function definition
In any other cases, a function probably non empty, or we're not inside a function at all
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.