Skip to content

fix: use is None instead of == None (PEP 8 E711)#5651

Open
harshadkhetpal wants to merge 2 commits intoaws:masterfrom
harshadkhetpal:fix/pep8-is-none-codegen
Open

fix: use is None instead of == None (PEP 8 E711)#5651
harshadkhetpal wants to merge 2 commits intoaws:masterfrom
harshadkhetpal:fix/pep8-is-none-codegen

Conversation

@harshadkhetpal
Copy link

Summary

Replace == None with is None in two files under sagemaker-core/src/sagemaker/core/tools/ to comply with PEP 8 E711.

Using is / is not for None comparisons is the recommended Python idiom since None is a singleton.

Changes:

  • resources_codegen.py line 646: if documentation == None: -> if documentation is None:
  • templates.py line 647: elif value == None or not value: -> elif value is None or not value:

Testing

No behavior change — is None is semantically equivalent for None comparisons and is the PEP 8 recommended style.

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