Skip to content

Conversation

@vvihorev
Copy link
Contributor

Problem

Type annotaitons like str | None are not supported for python 3.9. Darwin v1.3.0 can't be used

Solution

Change annotation to Optional[str]

Changelog

Fix type annotaiton, use Optional

Copilot AI review requested due to automatic review settings April 17, 2025 15:07
Copy link
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 fixes type annotation issues that prevent Darwin v1.3.0 from running on Python 3.9 by replacing incompatible union syntax with Optional.

  • Changed type annotation for the url property in the ReportJob class
  • Ensures compatibility with Python 3.9 by using Optional[str]
Comments suppressed due to low confidence (1)

darwin/datatypes.py:1576

  • Ensure that 'Optional' is imported from the 'typing' module if it's not already imported elsewhere in the file.
url: Optional[str]

@umbertoDifa umbertoDifa merged commit 2a87c88 into master Apr 17, 2025
24 checks passed
@umbertoDifa umbertoDifa deleted the fix-optional-type-annotation branch April 17, 2025 15:19
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