src/nitpick/plugins/ini.py
def show_missing_keys(self, section: str, values: List[Tuple[str, Any]]) -> Iterator[Fuss]:
        """Show the keys that are not present in a section."""
        parser = ConfigParser()
        missing_dict = OrderedDict(values)
        parser[section] = missing_dict
        output = self.get_example_cfg(parser)
        self.add_options_before_space(section, missing_dict)

        if section == TOP_SECTION:
            yield self.reporter.make_fuss(
                Violations.TOP_SECTION_MISSING_OPTION, self.contents_without_top_section(output), self.fix
            )
        else:
            yield self.reporter.make_fuss(Violations.MISSING_OPTION, output, self.fix, section=section)
Show the keys that are not present in a section.
Show the keys that are not present in a section.
Show the keys that are not present in a section .
def show_missing_keys(self, section: str, values: List[Tuple[str, Any]]) -> Iterator[Fuss]:
        parser = ConfigParser()
        missing_dict = OrderedDict(values)
        parser[section] = missing_dict
        output = self.get_example_cfg(parser)
        self.add_options_before_space(section, missing_dict)
        if section == TOP_SECTION:
            yield self.reporter.make_fuss(
                Violations.TOP_SECTION_MISSING_OPTION, self.contents_without_top_section(output), self.fix
            )
        else:
            yield self.reporter.make_fuss(Violations.MISSING_OPTION, output, self.fix, section=section)
def show_missing_keys ( self , section : str , values : List [ Tuple [ str , Any ] ] ) -> Iterator [ Fuss ] : parser = ConfigParser ( ) missing_dict = OrderedDict ( values ) parser [ section ] = missing_dict output = self . get_example_cfg ( parser ) self . add_options_before_space ( section , missing_dict ) if section == TOP_SECTION : yield self . reporter . make_fuss ( Violations . TOP_SECTION_MISSING_OPTION , self . contents_without_top_section ( output ) , self . fix ) else : yield self . reporter . make_fuss ( Violations . MISSING_OPTION , output , self . fix , section = section )
Show the keys that are not present in a section.
Show the keys that are not present in a section .
"""Show the keys that are not present in a section."""
self
section
str
values
List[Tuple[str, Any]]