Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Open
harshadkhetpal wants to merge 2 commits intoaws:masteraws/sagemaker-python-sdk:masterfrom
harshadkhetpal:fix/pep8-is-none-codegenharshadkhetpal/sagemaker-python-sdk:fix/pep8-is-none-codegenCopy head branch name to clipboard
Open

fix: use is None instead of == None (PEP 8 E711)#5651
harshadkhetpal wants to merge 2 commits intoaws:masteraws/sagemaker-python-sdk:masterfrom
harshadkhetpal:fix/pep8-is-none-codegenharshadkhetpal/sagemaker-python-sdk:fix/pep8-is-none-codegenCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.