You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case it the following:
We have some additional magic that we want to always use in our project.
So one idea would be to create an instance of Magic with the appropriate magic_file.
But now when we want to specify mime=True or follow_symlinks=True we need to create a new instance of Magic.
I guess one could say that all other arguments than magic_file are of a more short-lived nature.
This leads to some boilerplate which I think belongs in python-magic instead.
My proposal would be to add some way to set a default value for magic_file.
While I know that this is the way libmagic is designed I think we can to better in a wrapper library.
My use case it the following:
We have some additional magic that we want to always use in our project.
So one idea would be to create an instance of
Magic
with the appropriatemagic_file
.But now when we want to specify
mime=True
orfollow_symlinks=True
we need to create a new instance ofMagic
.I guess one could say that all other arguments than
magic_file
are of a more short-lived nature.This leads to some boilerplate which I think belongs in python-magic instead.
My proposal would be to add some way to set a default value for
magic_file
.While I know that this is the way libmagic is designed I think we can to better in a wrapper library.
Related:
#304
fkie-cad/FACT_core#1140
The text was updated successfully, but these errors were encountered: