Skip to content

Pydantic models for table json responses #921

Pydantic models for table json responses

Pydantic models for table json responses #921

GitHub Actions / JUnit Test Report failed Aug 1, 2023 in 0s

1 tests run, 0 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 339 in .babelrc

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

collection failure
Raw output
/usr/local/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
    ???
<frozen importlib._bootstrap>:1027: in _find_and_load
    ???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:688: in _load_unlocked
    ???
../venv/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:171: in exec_module
    exec(co, module.__dict__)
tests/frontend/conftest.py:11: in <module>
    from web import PycroftFlask
web/__init__.py:12: in <module>
    from .app import make_app, PycroftFlask
web/app.py:25: in <module>
    from .blueprints import (
web/blueprints/facilities/__init__.py:51: in <module>
    from .tables import (
web/blueprints/facilities/tables.py:16: in <module>
    from web.blueprints.infrastructure.tables import no_inf_change
web/blueprints/infrastructure/__init__.py:34: in <module>
    from .tables import (
web/blueprints/infrastructure/tables.py:72: in <module>
    class VlanRow(BaseModel):
../venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py:97: in __new__
    private_attributes = inspect_namespace(
../venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py:339: in inspect_namespace
    raise PydanticUserError(
E   pydantic.errors.PydanticUserError: A non-annotated attribute was detected: `config = {'from_attributes': True}`. All model fields require a type annotation; if `config` is not meant to be a field, you may be able to resolve this error by annotating it as a `ClassVar` or updating `model_config['ignored_types']`.
E   
E   For further information visit https://errors.pydantic.dev/2.0.3/u/model-field-missing-annotation