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: evaluate_connect_function should raise error on un-nested imports #3655

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 10, 2024

  1. FIX: make if-statement for extra-informative message in evaluate_conn…

    …ect_function more permissive
    
    the if-statement in this function is very specific and ensures that the error message both starts with "global name" and ends with "is not defined" before raising the informative error about nested imports. nipreps/nibabies#365 gives one example where this if-statement is too specific, and doesn't catch a NameError that does actually arise from a module-level import.
    scott-huberty authored and effigies committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    469d0c6 View commit details
    Browse the repository at this point in the history
  2. FIX: improve evaluate_connect_function error handling.

    This incorporates Chris's suggestions from nipy#3655 (comment)
    
    Except I raise a new error and include the original error message (instead of revising the original error message).
    
    Co-authored-by: Chris Markiewicz <[email protected]>
    scott-huberty and effigies committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    df241b2 View commit details
    Browse the repository at this point in the history