Kaggle / kagglehub

Python library to access Kaggle resources
Apache License 2.0
47 stars 9 forks source link

Colab Resolver #53

Closed mayankmalik-colab closed 8 months ago

mayankmalik-colab commented 8 months ago

b/303240466

rosbo commented 8 months ago

/gcbrun

rosbo commented 8 months ago

/gcbrun

rosbo commented 8 months ago

Here is the linter failure:

Step #3 - "lint": src/kagglehub/clients.py:233: error: Missing return statement  [return]
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:18: error: Signature of "is_supported" incompatible with supertype "Resolver"  [override]
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:18: note:      Superclass:
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:18: note:          def is_supported(self, handle: ModelHandle, path: str | None = ...) -> Any
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:18: note:      Subclass:
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:18: note:          def is_supported(self, h: ModelHandle, *_: Any, **__: Any) -> bool
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:31: error: Incompatible types in assignment (expression has type "int | None", target has type "str")  [assignment]
Step #3 - "lint": src/kagglehub/colab_cache_resolver.py:53: error: Incompatible types in assignment (expression has type "int | None", target has type "str")  [assignment]

@mayankmalik-colab You should be seeing the same error locally when running hatch run lint:all. Let me know if that is not the case.

rosbo commented 8 months ago

/gcbrun

rosbo commented 8 months ago

Yeah! All tests are passing now. Congrats @mayankmalik-colab on your first PR to kagglehub and thank you :)

mayankmalik-colab commented 8 months ago

Yeah! All tests are passing now. Congrats @mayankmalik-colab on your first PR to kagglehub and thank you :)

Thanks to you @rosbo . I don't know why but hatch run lint:all was not working as expected on my machine, but your pr really helped :)