src/nitpick/project.py
def merge_styles(self, offline: bool) -> Iterator[Fuss]:
        """Merge one or multiple style files."""
        config = self.read_configuration()

        # pylint: disable=import-outside-toplevel
        from nitpick.style import Style

        style = Style(self, offline, config.cache)
        style_errors = list(style.find_initial_styles(peekable(always_iterable(config.styles))))
        if style_errors:
            raise QuitComplainingError(style_errors)

        self.style_dict = style.merge_toml_dict()

        from nitpick.flake8 import NitpickFlake8Extension

        minimum_version = search_dict(NITPICK_MINIMUM_VERSION_JMEX, self.style_dict, None)
        logger.debug(f"Minimum version: {minimum_version}")
        if minimum_version and version_to_tuple(NitpickFlake8Extension.version) < version_to_tuple(minimum_version):
            yield Reporter().make_fuss(
                ProjectViolations.MINIMUM_VERSION,
                project=PROJECT_NAME,
                expected=minimum_version,
                actual=NitpickFlake8Extension.version,
            )

        self.nitpick_section = self.style_dict.get("nitpick", {})
        self.nitpick_files_section = self.nitpick_section.get("files", {})
Merge one or multiple style files.
Merge one or multiple style files.
Merge one or multiple style files .
def merge_styles(self, offline: bool) -> Iterator[Fuss]:
        config = self.read_configuration()
        from nitpick.style import Style
        style = Style(self, offline, config.cache)
        style_errors = list(style.find_initial_styles(peekable(always_iterable(config.styles))))
        if style_errors:
            raise QuitComplainingError(style_errors)
        self.style_dict = style.merge_toml_dict()
        from nitpick.flake8 import NitpickFlake8Extension
        minimum_version = search_dict(NITPICK_MINIMUM_VERSION_JMEX, self.style_dict, None)
        logger.debug(f"Minimum version: {minimum_version}")
        if minimum_version and version_to_tuple(NitpickFlake8Extension.version) < version_to_tuple(minimum_version):
            yield Reporter().make_fuss(
                ProjectViolations.MINIMUM_VERSION,
                project=PROJECT_NAME,
                expected=minimum_version,
                actual=NitpickFlake8Extension.version,
            )
        self.nitpick_section = self.style_dict.get("nitpick", {})
        self.nitpick_files_section = self.nitpick_section.get("files", {})
def merge_styles ( self , offline : bool ) -> Iterator [ Fuss ] : config = self . read_configuration ( ) from nitpick . style import Style style = Style ( self , offline , config . cache ) style_errors = list ( style . find_initial_styles ( peekable ( always_iterable ( config . styles ) ) ) ) if style_errors : raise QuitComplainingError ( style_errors ) self . style_dict = style . merge_toml_dict ( ) from nitpick . flake8 import NitpickFlake8Extension minimum_version = search_dict ( NITPICK_MINIMUM_VERSION_JMEX , self . style_dict , None ) logger . debug ( f"Minimum version: {minimum_version}" ) if minimum_version and version_to_tuple ( NitpickFlake8Extension . version ) < version_to_tuple ( minimum_version ) : yield Reporter ( ) . make_fuss ( ProjectViolations . MINIMUM_VERSION , project = PROJECT_NAME , expected = minimum_version , actual = NitpickFlake8Extension . version , ) self . nitpick_section = self . style_dict . get ( "nitpick" , { } ) self . nitpick_files_section = self . nitpick_section . get ( "files" , { } )
Merge one or multiple style files.
Merge one or multiple style files .
"""Merge one or multiple style files.""" # pylint: disable=import-outside-toplevel
self
offline
bool