From af7d8d203e52aaf6238456e9efac9881edf86522 Mon Sep 17 00:00:00 2001 From: Augusto Wagner Andreoli Date: Mon, 4 Mar 2019 04:39:45 +0100 Subject: [PATCH] fix: use only yield to return values --- flake8_nitpick/files/pyproject_toml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake8_nitpick/files/pyproject_toml.py b/flake8_nitpick/files/pyproject_toml.py index 9151e547..bde3fdd6 100644 --- a/flake8_nitpick/files/pyproject_toml.py +++ b/flake8_nitpick/files/pyproject_toml.py @@ -17,7 +17,7 @@ def check_rules(self) -> YieldFlake8Error: actual = flatten(self.config.pyproject_dict) expected = flatten(self.file_dict) if expected.items() <= actual.items(): - return [] + return missing_dict = unflatten({k: v for k, v in expected.items() if k not in actual}) if missing_dict: