Relented on the strict import of direct objects/classes for the typing
module only. Typing module components can be directly imported because
it makes the code really painful to read and write otherwise.
This is still in-line with the python style guide adopted from Google at
http://google.github.io/styleguide/pyguide.html section 2.2.
As @npetroni quite rightly pointed out, the purpose of the CLI is to
make it easy for people to use on the commandline, so at the expense of
some dynamic ability, -f is returning for convenience purposes.
This reverts commit 4450766d50.
Given the single-location parameter is now a URIRequirement, and
can accept normal files (rather than a full URL), but is far more
accurate (it matches exactly what the automagic requests). If there's
much uproar we can revert this one commit.
At the moment these are no different than strings, but they allow us to
do things like add URI handlers to file names if no scheme is provided,
and eventually do file existence testing. This also allows the web URI
to allow uploads as a means of passing a file in.
The configuration will only store the filename, because otherwise
someone could add a huge file which would need to be carried around in
the config forever after. Handling file existence errors is up to the
UI after the volatility library returns a "file not found" type
exception.
I'm not entirely happy with this, it's an overly specific hard coded
change, but luckily it's only for this CLI, it has no impact on other
UIs, either text based on web based.
I really don't want people to become reliant on this, but also I don't
want to be that guy that stops people being able to do their work
quickly for reasons of correctness. May future volatility devs forgive
me...