Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-2467

Use union types for better readability

    XMLWordPrintable

    Details

    • Type: Clean up
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0.0
    • Fix Version/s: None
    • Component/s: Framework

      Description

      Use union types to improve readability of the whole project. See the PEP 604 for details.

      Short summary: we can rewrite Union and Optional.

      Before:

      def f(list: List[Union[int, str]], param: Optional[int]) -> Union[float, str]
      

      After:

      def f(list: List[int | str], param: int | None) -> float | str:
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: