-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
bugSomething isn't workingSomething isn't workinggood-titleThe title was checked by ChatGPTThe title was checked by ChatGPTpdd
Description
The puzzle 813-c4089b79 from #813 has to be resolved:
aibolit/test/config/test_config.py
Lines 13 to 27 in 9f246f2
| TODO #813:30min/DEV Ensure All Metrics Accept `ast: AST` Parameter with Type Hints | |
| Verify that all metrics in the config accept an AST parameter with proper type hints. | |
| Probable solutions: | |
| 1. Every metric factory in patterns_config["metrics"] produces a metric with: | |
| - A parameter named "ast" in its call signature | |
| - The "ast" parameter properly annotated as `aibolit.ast_framework.ast.AST` or a subclass | |
| 2. Remove any metrics that cannot comply with this interface. | |
| Once all metrics meet requirements, remove the decorator. | |
| ''' | |
| patterns_config = Config.get_patterns_config() | |
| for metric_config in patterns_config['metrics']: | |
| metric = metric_config['make']() | |
| metric_signature = inspect.signature(metric.value) | |
| assert 'ast' in metric_signature.parameters | |
| assert metric_signature.parameters['ast'].annotation is AST |
The puzzle was created by @AntonProkopyev on 14-Jun-25.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood-titleThe title was checked by ChatGPTThe title was checked by ChatGPTpdd