DoReCo / DoReCo/multitool

Block that should never execute except in strange edge case scenarios

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.