Skip to content

chore: introduce PYL-E0119#34

Open
sourya-deepsource wants to merge 1 commit intomasterfrom
test-backwards-master
Open

chore: introduce PYL-E0119#34
sourya-deepsource wants to merge 1 commit intomasterfrom
test-backwards-master

Conversation

@sourya-deepsource
Copy link

No description provided.

Signed-off-by: Sourya Vatsyayan <sourya@deepsource.io>
@deepsource-development
Copy link

Here's the code health analysis summary for commits 9d1323c..9c71026. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython❌ Failure
❗ 2 occurences introduced
🎯 40 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

@deepsource-development deepsource-development bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeepSource detected 2 newly introduced issue(s) in this pull request.


def cmethod(cls, something):
"""class method-to-be"""
print('value: {}').format(123)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Syntax error in cmethod function on line 29 causing parse failure

The function cmethod defined on line 29 contains incorrect indentation and misuse of print statement and string formatting, causing a syntax error. This prevents the code from running and must be fixed for proper execution. Correct by indenting print properly and using print('value: {}'.format(123)) syntax.


def cmethod(cls, something):
"""class method-to-be"""
print('value: {}').format(123)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .format() method is called on the result of print(), which is None

The code print('value: {}').format(123) will fail at runtime. In Python 3, print() is a function that returns None. Calling .format() on None raises an AttributeError. The correct syntax is print('value: {}'.format(123)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments