[GRASS-git] [OSGeo/grass] 2b88eb: temporal: Adjust typing annotation for `datetime_t...

Edouard Choinière noreply at github.com
Thu Dec 19 09:50:32 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 2b88ebb1b7db41ffdcecea9718d17350aa857fc4
      https://github.com/OSGeo/grass/commit/2b88ebb1b7db41ffdcecea9718d17350aa857fc4
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2024-12-19 (Thu, 19 Dec 2024)

  Changed paths:
    M python/grass/temporal/datetime_math.py

  Log Message:
  -----------
  temporal: Adjust typing annotation for `datetime_to_grass_datetime_string()` (#4840)

`grass.temporal.datetime_math.datetime_to_grass_datetime_string()` checks for `None`, and handles the case where it is `None`, so the `dt` argument can safely be `None`.

This fixes some pylance type checking errors in `_pretifyTimeLabels()`  of gui/wxpython/animation/temporal_manager.py, which rightfully detected that the result of `tgis.string_to_datetime(start)` can be either `datetime` or `None` and that `None` wouldn't be accepted into `datetime_to_grass_datetime_string()`.



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list