Block that should never execute except in strange edge case scenarios

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start with conversion_data/conversion/Transcription.py at lines 1029-1033 and inspect how this import check affects the surrounding conversion path. Determine the intended behavior for an import failure, then run the relevant conversion workflow to verify the edge case is handled without masking unrelated exceptions.

Written by the indexing model from the issue text.

Description

https://github.com/DoReCo/multitool/blob/6791f54616f7f1df2b7349b05c93275c678e857a/conversion_data/conversion/Transcription.py#L1029-L1033

Since re is a standard library module this import should succeed in any standards compliant python installation that hasn't had some form of sys.path manipulation that introduces a module re earlier than the standard library module. If checking this behavior is actually intended then it really deserves some form of documentation as it is entirely non-obvious that you have to check for an import failure here. If it is just an import error check then you should catch just that exception instead of catching all exceptions.

Perhaps the logic here can be expressed some other way that doesn't open up as many possibilities for bugs?

Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DoReCo/multitool

All issues in DoReCo/multitool

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.