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

Respect pep8 and revert 659c8f4 #172

Merged
merged 3 commits into from
Jan 29, 2023
Merged

Respect pep8 and revert 659c8f4 #172

merged 3 commits into from
Jan 29, 2023

Conversation

up-n-atom
Copy link
Contributor

As described in pep8: "Object type comparisons should always use isinstance() instead of comparing types directly"

Ref. https://peps.python.org/pep-0008/

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
As described in pep8: "Object type comparisons should always use isinstance() instead of comparing types directly:"

Ref. https://peps.python.org/pep-0008/
up-n-atom and others added 2 commits January 29, 2023 03:00

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
datetime.datetime inherits datetime.date and will prematurely evaluate as an instance of datetime.date.
@rongxin-liu
Copy link
Contributor

Looks good, merging!

@rongxin-liu rongxin-liu merged commit 5c06978 into cs50:main Jan 29, 2023
@rongxin-liu
Copy link
Contributor

As described in pep8: "Object type comparisons should always use isinstance() instead of comparing types directly"

Ref. https://peps.python.org/pep-0008/

Thank you!

@up-n-atom up-n-atom deleted the type-checking branch January 30, 2023 00:51
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.

None yet

2 participants