src/nitpick/plugins/ini.py
def add_options_before_space(self, section: str, options: OrderedDict) -> None:
        """Add new options before a blank line in the end of the section."""
        if not self.fix:
            return

        space_removed = False
        while isinstance(self.updater[section].last_block, Space):
            space_removed = True
            self.updater[section].last_block.remove()

        self.updater[section].update(options)
        self.dirty = True

        if space_removed:
            self.updater[section].last_block.add_after.space(1)
Add new options before a blank line in the end of the section.
Add new options before a blank line in the end of the section.
Add new options before a blank line in the end of the section .
def add_options_before_space(self, section: str, options: OrderedDict) -> None:
        if not self.fix:
            return
        space_removed = False
        while isinstance(self.updater[section].last_block, Space):
            space_removed = True
            self.updater[section].last_block.remove()
        self.updater[section].update(options)
        self.dirty = True
        if space_removed:
            self.updater[section].last_block.add_after.space(1)
def add_options_before_space ( self , section : str , options : OrderedDict ) -> None : if not self . fix : return space_removed = False while isinstance ( self . updater [ section ] . last_block , Space ) : space_removed = True self . updater [ section ] . last_block . remove ( ) self . updater [ section ] . update ( options ) self . dirty = True if space_removed : self . updater [ section ] . last_block . add_after . space ( 1 )
Add new options before a blank line in the end of the section.
Add new options before a blank line in the end of the section .
"""Add new options before a blank line in the end of the section."""
self
section
str
options
OrderedDict