Conversation
Signed-off-by: Sourya Vatsyayan <sourya@deepsource.io>
|
Here's the code health analysis summary for commits Analysis Summary
|
|
|
||
| def cmethod(cls, something): | ||
| """class method-to-be""" | ||
| print('value: {}').format(123) |
There was a problem hiding this comment.
Syntax error in cmethod function at line 29 with incorrect print usage
The function cmethod on line 29 contains a syntax error due to incorrect indentation and misuse of print and .format(). This causes immediate runtime failure preventing execution. Correct by properly indenting the print statement and using print('value: {}'.format(123)) or print(f'value: {123}').
|
|
||
| def cmethod(cls, something): | ||
| """class method-to-be""" | ||
| print('value: {}').format(123) |
There was a problem hiding this comment.
Incorrectly calling .format() on the result of print() function
The print() function returns None. Calling .format() on None will raise an AttributeError at runtime. The call should be print('value: {}'.format(123)).
|
|
||
| def cmethod(cls, something): | ||
| """class method-to-be""" | ||
| print('value: {}').format(123) |
There was a problem hiding this comment.
Incorrect indentation and string formatting in cmethod() at line 29 cause syntax error
The function cmethod() defined on line 29 contains an indentation error and incorrect usage of the print function with .format(). This leads to a Python syntax error preventing code execution. Fix by indenting the print line properly and rewriting as print('value: {}'.format(123)).
No description provided.