Closed jGaboardi closed 1 year ago
If the package is not installed and you try to load __version__
, it errors. You can either catch that with try/except as is in the setuptools_scm docs or like this, which is what ruff suggests instead.
Got it! Another +1 Karma Point for you!
https://github.com/pysal/momepy/blob/130ddfde765820396c4b5f256f663aa13e32fda6/momepy/__init__.py#L20
Hey, @martinfleis! What's the actual need for
with contextlib.suppress(PackageNotFoundError)
here? I have been digging around but haven't found a clear answer.