google / weather-tools

Tools to make weather data accessible and useful.
https://weather-tools.readthedocs.io/
Apache License 2.0
208 stars 39 forks source link

[CI/CD failing] Ruff version deprecated. #392

Closed dabhicusp closed 10 months ago

dabhicusp commented 11 months ago

In the code, we did not specify the Ruff version, so it pick the latest version (i.e. 0.0.288 for now) while running ci/cd pipeline. Unfortunately, this latest version deprecated this method type(value) which is used for checking variable types. This method is widely used in our codebase.

To resolve this issue, we have two options:

  1. Fix Ruff Version: We can fix the Ruff version in our code to a version(0.0.280) that still supports the type(value) method. This would maintain our existing code logic without changes.
  2. Replace type(value) with isinstance(): We can modify our code to use the isinstance() method for checking variable types.

Please share your thoughts on which approach we should take. @alxmrs

alxmrs commented 11 months ago

I recommend doing (1) for now, and then creating an issue to follow up to implement (2) to do later. (2) also fits our internal style standards.

dabhicusp commented 10 months ago

Closed this issue as this is fixed in #387.