Support for Multi-line Code Snippets with #@ Marker #2566
Labels
Enhancement ✨
Improvement to a component
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Steps to reproduce
Current behavior
The code checker creates new nodes for each line when the #@ marker is used in multi-line code snippets, resulting in separate nodes rather than treating the code block as one unit. This reduces the clarity of scenarios and makes it challenging to handle more complex, multi-line code.
Additionally, having everything on a single line makes the code harder to read and maintain. For example, writing it all in one line like below is less readable and too long:
model = tf.keras.Sequential(layers=[tf.keras.layers.Dense(units=64, activation='relu'), tf.keras.layers.Dense(units=10)]) #@
Expected behavior
The code checker should treat multi-line code snippets marked with #@ as a single unit, allowing for improved readability and easier handling of more complex scenarios.
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
outputThe text was updated successfully, but these errors were encountered: