Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Adjust calls to use has_filenames return value of None #5777

Merged
merged 1 commit into from
Nov 17, 2017

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Nov 16, 2017

Fixes #5776.

The code calling has_filename and is_file_opened was sometimes checking for a None or False value using if not index. This allowed the code to skip index 0 as a valid value.

I also added docstrings because I think it's confusing that a function called has_filename would return an integer and not a boolean. Additionally, is_file_opened can return a boolean or an integer depending on the parameter value.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @csabella!

@ccordoba12 ccordoba12 merged commit 3fa19b2 into spyder-ide:3.x Nov 17, 2017
ccordoba12 added a commit that referenced this pull request Nov 17, 2017
@csabella csabella deleted the has_filename branch November 17, 2017 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants