Mongo client needs to be passed the port from config,
otherwise it will always default to 27017.
Also retrieving the mongodb version from the config-changed hook
must use the port of the currently running instance,
rather than the port from config,
because the port in config may have been updated.
Other unrelated changes are a result of `tox -e black` formatting,
required to fix the lint check.
Mongo client needs to be passed the port from config,
otherwise it will always default to 27017.
Also retrieving the mongodb version from the config-changed hook
must use the port of the currently running instance,
rather than the port from config,
because the port in config may have been updated.
Other unrelated changes are a result of `tox -e black` formatting,
required to fix the lint check.