panoptisch icon indicating copy to clipboard operation
panoptisch copied to clipboard

Suppress ModuleNotFound for specific platforms

Open smontanaro opened this issue 3 years ago • 3 comments

While it occurs to me, most of the ModuleNotFound reasons in my initial example run are for Windows-only modules. As I'm on Mac (or Linux), it would be nice to suppress missing platform-specific modules for other platforms. Even if I'm interested in winreg, it makes sense to suppress that warning on Linux or Mac, as it's simply never going to be found.

smontanaro avatar Dec 09 '22 21:12 smontanaro

Thanks for the suggestion, by warning I assume you mean the AAAA could not resolve x module message?

R9295 avatar Dec 09 '22 22:12 R9295

I was thinking of this json entry:

                {
                    "reason": "ModuleNotFoundError",
                    "name": "winreg"
                },

On anything other than a Windows machine, I think it's effectively a false positive.

smontanaro avatar Dec 09 '22 22:12 smontanaro

I see, that makes sense, but would it not be confusing if the module has no sub-dependencies while the rest do? One way to handle it could be with a different reason message, for example, reason: "PlatformSpecificModule"

R9295 avatar Dec 10 '22 12:12 R9295