From a36063b80ebfebc54368e645d8e74000d38ae75a Mon Sep 17 00:00:00 2001 From: Guillaume Klein Date: Fri, 17 Jun 2022 12:16:52 +0200 Subject: [PATCH] Add missing Optional marker in argument typing --- python/ctranslate2/specs/model_spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ctranslate2/specs/model_spec.py b/python/ctranslate2/specs/model_spec.py index 9ab3ec78d..5ef0e3aa0 100644 --- a/python/ctranslate2/specs/model_spec.py +++ b/python/ctranslate2/specs/model_spec.py @@ -7,7 +7,7 @@ import shutil import struct -from typing import Dict, List +from typing import Dict, List, Optional import numpy as np @@ -185,7 +185,7 @@ def _quantize(spec, name, value): self._visit(_quantize) - def optimize(self, quantization: str = None) -> None: + def optimize(self, quantization: Optional[str] = None) -> None: """Recursively applies some optimizations to this layer: * Alias variables with the same shape and value.