Skip to content

Fix typing for _fill_device() methods - #393

Merged
JeanLucPons merged 1 commit into
mainfrom
fix-typing-for-fill-device
Sep 10, 2026
Merged

JeanLucPons merged 1 commit into
mainfrom
fix-typing-for-fill-device

Conversation

@JeanLucPons

Copy link
Copy Markdown
Member

This PR fix typing for _fill_device() methods and also add a super method in Element to inform developers who may forget to implement it. It also allow better code introspection.

@JeanLucPons

Copy link
Copy Markdown
Member Author

It seems that there is a problem in the tango backend ?

tests/integration/test_dt4acc_twin_smoke.py::test_dt4acc_twin_accelerator_instantiates_and_reads_live_values[tango-pyaml] FAILED [ 14%]
tests/integration/test_dt4acc_twin_smoke.py::test_dt4acc_twin_accelerator_instantiates_and_reads_live_values[pyaml-cs-oa] PASSED [ 28%]
>       for attribute in self._attributes:
                         ^^^^^^^^^^^^^^^^
E       TypeError: 'NoneType' object is not iterable

../../../micromamba/envs/pyaml-dt4acc-integration/lib/python3.12/site-packages/tango/pyaml/multi_attribute.py:60: TypeError

@JeanLucPons

Copy link
Copy Markdown
Member Author

I can reproduce the issue in my own tests.
It was working with my previous tango backend release.

image

@gupichon

Copy link
Copy Markdown
Member

I can reproduce the issue in my own tests. It was working with my previous tango backend release.
image

Yes, I'm about to open an issue.

@TeresiaOlsson

Copy link
Copy Markdown
Member

It seems that there is a problem in the tango backend ?

tests/integration/test_dt4acc_twin_smoke.py::test_dt4acc_twin_accelerator_instantiates_and_reads_live_values[tango-pyaml] FAILED [ 14%]
tests/integration/test_dt4acc_twin_smoke.py::test_dt4acc_twin_accelerator_instantiates_and_reads_live_values[pyaml-cs-oa] PASSED [ 28%]
>       for attribute in self._attributes:
                         ^^^^^^^^^^^^^^^^
E       TypeError: 'NoneType' object is not iterable

../../../micromamba/envs/pyaml-dt4acc-integration/lib/python3.12/site-packages/tango/pyaml/multi_attribute.py:60: TypeError

It's the same problem that I fixed in this PR https://github.com/python-accelerator-middle-layer/tango-pyaml/pull/37/changes?

@TeresiaOlsson

Copy link
Copy Markdown
Member

Yes, I think so. I think I had exactly that error.

@JeanLucPons
JeanLucPons merged commit 45f79b5 into main Sep 10, 2026
3 of 4 checks passed
@JeanLucPons
JeanLucPons deleted the fix-typing-for-fill-device branch September 10, 2026 08:13
@gupichon

Copy link
Copy Markdown
Member

I'll adjust the pipeline to prevent this from happening again.

@JeanLucPons

Copy link
Copy Markdown
Member Author

Nice the fix 37 from @TeresiaOlsson works flawlessly.
Thx

@TeresiaOlsson

Copy link
Copy Markdown
Member

Nice the fix 37 from @TeresiaOlsson works flawlessly. Thx

Well... I also caused the bug to start with ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants