Skip to content

Fix issue caused by or op in isinstance#475

Merged
kairu-ms merged 1 commit intoAzure:devfrom
ReaNAiveD:fix-or-op-in-isinstance
Mar 31, 2025
Merged

Fix issue caused by or op in isinstance#475
kairu-ms merged 1 commit intoAzure:devfrom
ReaNAiveD:fix-or-op-in-isinstance

Conversation

@ReaNAiveD
Copy link
Copy Markdown
Member

Operator | in instance is not supported in Python 3.8 and Python 3.9. Use (A, B) instead.

@ReaNAiveD ReaNAiveD requested review from Copilot and kairu-ms March 31, 2025 05:16
@ReaNAiveD ReaNAiveD self-assigned this Mar 31, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses an issue where the use of the bitwise OR operator (|) in an isinstance check is not supported in Python 3.8 and 3.9. The change updates the isinstance argument to use a tuple, ensuring compatibility with older Python versions.

  • Replace "CMDSpecsCommandTree | CMDSpecsPartialCommandTree" with "(CMDSpecsCommandTree, CMDSpecsPartialCommandTree)"

@kairu-ms kairu-ms merged commit 8e30366 into Azure:dev Mar 31, 2025
2 checks passed
@AllyW AllyW mentioned this pull request Apr 14, 2025
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.

3 participants