Skip to content

make gensim optional #2287

make gensim optional

make gensim optional #2287

Triggered via pull request July 12, 2024 22:14
Status Failure
Total duration 2h 47m 22s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 1 warning
test: flair/__init__.py#L1
mypy-status mypy exited with status 1.
test: flair/class_utils.py#L1
flair/class_utils.py 31: error: Incompatible return value type (got Module, expected "List[Any]") [return-value] 33: error: No overload variant of "getattr" matches argument types Module, "List[str]" [call-overload] 33: note: Possible overload variants: 33: note: def getattr(object, str, /) -> Any 33: note: def getattr(object, str, None, /) -> Optional[Any] 33: note: def getattr(object, str, bool, /) -> Union[Any, bool] 33: note: def getattr(object, str, List[Any], /) -> Union[Any, List[Any]] 33: note: def getattr(object, str, Dict[Any, Any], /) -> Union[Any, Dict[Any, Any]] 33: note: def [_T] getattr(object, str, _T, /) -> Union[Any, _T]
test: flair/embeddings/token.py#L1
flair/embeddings/token.py 198: error: Argument 3 to "lazy_import" has incompatible type "str"; expected "List[str]" [arg-type] 396: error: Argument 3 to "lazy_import" has incompatible type "str"; expected "List[str]" [arg-type] 398: error: Variable "KeyedVectors" is not valid as a type [valid-type] 398: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases 401: error: KeyedVectors? has no attribute "vectors" [attr-defined] 402: error: KeyedVectors? has no attribute "vector_size" [attr-defined] 409: error: KeyedVectors? has no attribute "key_to_index" [attr-defined] 412: error: KeyedVectors? has no attribute "__dict__" [attr-defined] 1052: error: Argument 3 to "lazy_import" has incompatible type "str"; expected "List[str]" [arg-type] 1052: error: Argument 4 to "lazy_import" has incompatible type "str"; expected "List[str]" [arg-type] 1056: error: Variable "FastTextKeyedVectors" is not valid as a type [valid-type] 1056: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases 1060: error: FastTextKeyedVectors? has no attribute "vector_size" [attr-defined] 1071: error: FastTextKeyedVectors? has no attribute "get_vector" [attr-defined] 1286: error: Argument 3 to "lazy_import" has incompatible type "str"; expected "List[str]" [arg-type] 1402: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "str") [assignment] 1406: error: Argument 3 to "lazy_import" has incompatible type "str"; expected "List[str]" [arg-type] 1477: error: Argument 1 to "append" of "list" has incompatible type "List[Any]"; expected "int" [arg-type]
test
Process completed with exit code 1.
test
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions/setup-python@v4, actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/