Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix python3.8 typehints #1714

Closed
casperdcl opened this issue Feb 19, 2024 · 0 comments · Fixed by #1715
Closed

fix python3.8 typehints #1714

casperdcl opened this issue Feb 19, 2024 · 0 comments · Fixed by #1715
Assignees

Comments

@casperdcl
Copy link
Member

casperdcl commented Feb 19, 2024

Due to Algorithm.run(callbacks) typehint list[...] introduced in #1659

From https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Framework-dev (related #1598, #1560):

======================================================================
ERROR: test_ISTA_algorithm (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_ISTA_algorithm
Traceback (most recent call last):
  File "C:\Users\gemst\miniconda3\conda-bld\cil_1708105222305\_test_env\lib\unittest\loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "C:\Users\gemst\miniconda3\conda-bld\cil_1708105222305\_test_env\lib\unittest\loader.py", line 377, in _get_module_from_ne
    __import__(name)
  File "C:\Users\gemst\miniconda3\conda-bld\cil_1708105222305\test_tmp\Wrappers\Python\test\test_ISTA_algorithm.py", line 21, in>
    from cil.optimisation.algorithms import ISTA
  File "C:\Users\gemst\miniconda3\conda-bld\cil_1708105222305\_test_env\lib\site-packages\cil\optimisation\algorithms\__init__.p>
    from .Algorithm import Algorithm
  File "C:\Users\gemst\miniconda3\conda-bld\cil_1708105222305\_test_env\lib\site-packages\cil\optimisation\algorithms\Algorithm.>
    class Algorithm:
  File "C:\Users\gemst\miniconda3\conda-bld\cil_1708105222305\_test_env\lib\site-packages\cil\optimisation\algorithms\Algorithm.m
    def run(self, iterations=None, callbacks: Optional[list[Callback]]=None, verbose=1, **kwargs):
TypeError: 'type' object is not subscriptable
@casperdcl casperdcl self-assigned this Feb 19, 2024
@casperdcl casperdcl mentioned this issue Feb 19, 2024
8 tasks
@casperdcl casperdcl changed the title fix python3.8 fix python3.8 typehints Feb 19, 2024
@casperdcl casperdcl mentioned this issue Feb 19, 2024
9 tasks
@MargaretDuff MargaretDuff moved this from ToDo to Done in Work plan Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant