3131__all__ = ["candidate_prompt" , "import_prompt" ]
3232
3333
34- class AbortImport (Exception ): # noqa: N818 breaking change
34+ class AbortImportError (Exception ):
3535 """Used to abort the import process."""
3636
3737
@@ -129,7 +129,7 @@ def process_candidates(new_album: Album, candidates: list[CandidateAlbum]) -> No
129129 max_candidates = config .CONFIG .settings .get ("import.max_candidates" )
130130 try :
131131 candidate_prompt (new_album , candidates [:max_candidates ])
132- except AbortImport as err :
132+ except AbortImportError as err :
133133 log .debug (err )
134134 raise SystemExit (0 ) from err
135135
@@ -142,7 +142,7 @@ def candidate_prompt(new_album: Album, candidates: list[CandidateAlbum]) -> None
142142 candidates: List of candidates to choose from.
143143
144144 Raises:
145- AbortImport : Import prompt was aborted by the user.
145+ AbortImportError : Import prompt was aborted by the user.
146146 """
147147 prompt_choices : list [PromptChoice ] = []
148148
@@ -204,7 +204,7 @@ def import_prompt(
204204 against ``old_album``.
205205
206206 Raises:
207- AbortImport : Import prompt was aborted by the user.
207+ AbortImportError : Import prompt was aborted by the user.
208208 """
209209 log .debug (f"Running import prompt. [{ new_album = } , { candidate = } ]" )
210210
@@ -249,7 +249,7 @@ def _abort_changes(
249249) -> None :
250250 """Aborts the album changes."""
251251 err_msg = "Import prompt aborted; no changes made."
252- raise AbortImport (err_msg )
252+ raise AbortImportError (err_msg )
253253
254254
255255def _fmt_import_updates (new_album : Album , candidate : CandidateAlbum ) -> Panel :
0 commit comments