diff --git a/flake8_nitpick/__init__.py b/flake8_nitpick/__init__.py index 9685d78b..414e0da5 100644 --- a/flake8_nitpick/__init__.py +++ b/flake8_nitpick/__init__.py @@ -293,7 +293,7 @@ def check_rules(self): yield self.file_error(105, f"Missing sections:\n{output}") generators = [] - for section in expected_sections: + for section in expected_sections - missing_sections: expected_dict = self.file_toml[section] actual_dict = dict(setup_cfg[section]) for diff_type, key, values in dictdiffer.diff(expected_dict, actual_dict):