Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-116

Use mypy to ensure types matching

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: NoVersionApplicable
    • Fix Version/s: Not yet scheduled version
    • Component/s: Core

      Description

      Use mypy to ensure types matching. And use a strict configuration (this will not be easy ):

      # Ensure full coverage
      disallow_untyped_calls = True
      disallow_untyped_defs = True
      disallow_incomplete_defs = True
      disallow_untyped_decorators = True
      
      # Restrict dynamic typing (a little)
      disallow_any_generics = True  # e.g. `x: List[Any]` or x: List`
      disallow_subclassing_any = True
      warn_return_any = True  # from functions not declared to return Any
      
      # Ensure we know what we do
      warn_redundant_casts = True
      warn_unused_ignores = True
      warn_unused_configs = True
      
      # Imports managment
      ignore_missing_imports = True
      follow_imports = True
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: