SUMMARY For the following code, inferred type for bar grows exponentially each time file is reparsed (during the save, I presume), in the end this causes kdevelop to hung because it took too much to process it. from typing import List, Optional, Tuple class Instance: pass def ham(instances: List[Instance]) -> List[Instance]: command_args = ["true"] action = functools.partial(bar, command_args=command_args) instances = map(action, instances) return list(filter(None, instances)) def bar(instance: Instance, command_args: List[str]) -> Optional[Instance]: return instance Note that importing functools resolves the issue. OBSERVED RESULT unsure (Instance, function unsure (Instance, function Instance (Instance, mixed)) (unsure (Instance, function Instance (Instance, mixed)), mixed)) bar( unsure (Instance, function unsure (Instance, function Instance (Instance, mixed)) (unsure (Instance, function Instance (Instance, mixed)), mixed)) instance, mixed command_args ) EXPECTED RESULT Instance bar( Instance instance, mixed command_args) SOFTWARE/OS VERSIONS KDE Frameworks 5.45.0 Qt 5.9.4 (built against 5.9.4) The xcb windowing system ADDITIONAL INFORMATION
Er...right. Yes. WHAT? HOW? Thanks for the report, I can reproduce this with 5.3-git and the provided example. Occasionally (but not always) the type was rounded to `unsure(Instance, <callable>) bar...`, which is slightly more reasonable and prevented it from growing.
Thank you for the crash report. As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Setting to confirmed as I think if this was not specifically fixed, it is almost certainly still present.