From 6e12490fbd1955a97f7491fe610db1c84e54d626 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Mon, 19 Jun 2017 17:20:53 +0200 Subject: [PATCH] Add some doc about CLI option and better informative message --- doc/0.getting_started.md | 3 +++ flatisfy/config.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/0.getting_started.md b/doc/0.getting_started.md index 8014d2c..a5e55e0 100644 --- a/doc/0.getting_started.md +++ b/doc/0.getting_started.md @@ -53,6 +53,9 @@ You can pass some command-line arguments to Flatisfy commands, common to all the * `--max-entries N` to overload the `max_entries` value from config. * `-v` to enable verbose output. * `-vv` to enable debug output. +* `--constraints` to specify a list of constraints to use (e.g. to restrict + import to a subset of available constraints from the config). This list + should be passed as a comma-separated list. ## Configuration diff --git a/flatisfy/config.py b/flatisfy/config.py index 11e09a2..d995552 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -231,7 +231,9 @@ def load_config(args=None): # Handle constraints filtering if args and getattr(args, "constraints", None) is not None: LOGGER.info( - "Filtering constraints from config according to CLI argument." + ("Filtering constraints from config according to CLI argument. " + "Using only the following constraints: %s."), + args.constraints.replace(",", ", ") ) constraints_filter = args.constraints.split(",") config_data["constraints"] = {