Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/bazarr/src/commit/49e70dadf08fd385759510d6d42225866e16bb8d/libs/knowit/units.py You should set ROOT_URL correctly, otherwise the web may not work correctly.
bazarr/libs/knowit/units.py

38 lines
824 B

import typing
class NullRegistry:
"""A NullRegistry that masquerades as a pint.UnitRegistry."""
def __init__(self):
"""Initialize a null registry."""
def __getattr__(self, item: typing.Any) -> int:
"""Return a Scalar 1 to simulate a unit."""
return 1
def __bool__(self):
"""Return False since a NullRegistry is not a pint.UnitRegistry."""
return False
def define(self, *args, **kwargs):
"""Pretend to add unit to the registry."""
def _build_unit_registry():
try:
import pint
registry = pint.UnitRegistry()
registry.define('FPS = 1 * hertz')
pint.set_application_registry(registry)
return registry
except ModuleNotFoundError:
pass
return NullRegistry()
units = _build_unit_registry()