usort/sorting.py
def name_overlap(self, block: SortableBlock, imp: SortableImport) -> Set[str]:
        """
        Find imported names that overlap existing names for a block of imports.

        Compares imports of a proposed, but not yet included, import with existing imports
        in a block. Ignores multiple imports of the same "name" that come from the same
        qualified name. Eg, `os.path` doesn't shadow `os`, but `from foo import os` does.

        Returns a set of qualified names from `imp` that shadow names from `block`.
        This set will be empty if there are no overlaps.
        """
        overlap: Set[str] = set()

        for key, value in imp.imported_names.items():
            shadowed = block.imported_names.get(key)
            if shadowed and shadowed != value:
                line = self.transformer.get_line(imp.node)
                self.warnings.append(
                    SortWarning(
                        line,
                        f"Name {shadowed!r} shadowed by {value!r}; "
                        "implicit block split",
                    )
                )
                overlap.add(shadowed)

        return overlap

        Find imported names that overlap existing names for a block of imports.

        Compares imports of a proposed, but not yet included, import with existing imports
        in a block. Ignores multiple imports of the same "name" that come from the same
        qualified name. Eg, `os.path` doesn't shadow `os`, but `from foo import os` does.

        Returns a set of qualified names from `imp` that shadow names from `block`.
        This set will be empty if there are no overlaps.
        
Find imported names that overlap existing names for a block of imports.
Compares imports of a proposed, but not yet included, import with existing imports
in a block. Ignores multiple imports of the same "name" that come from the same
qualified name.

Returns a set of qualified names from `imp` that shadow names from `block`.
This set will be empty if there are no overlaps.
Find imported names that overlap existing names for a block of imports . Compares imports of a proposed but not yet included import with existing imports in a block . Ignores multiple imports of the same " name " that come from the same qualified name . Returns a set of qualified names from ` imp ` that shadow names from ` block ` . This set will be empty if there are no overlaps .
def name_overlap(self, block: SortableBlock, imp: SortableImport) -> Set[str]:
        overlap: Set[str] = set()
        for key, value in imp.imported_names.items():
            shadowed = block.imported_names.get(key)
            if shadowed and shadowed != value:
                line = self.transformer.get_line(imp.node)
                self.warnings.append(
                    SortWarning(
                        line,
                        f"Name {shadowed!r} shadowed by {value!r}; "
                        "implicit block split",
                    )
                )
                overlap.add(shadowed)
        return overlap
def name_overlap ( self , block : SortableBlock , imp : SortableImport ) -> Set [ str ] : overlap : Set [ str ] = set ( ) for key , value in imp . imported_names . items ( ) : shadowed = block . imported_names . get ( key ) if shadowed and shadowed != value : line = self . transformer . get_line ( imp . node ) self . warnings . append ( SortWarning ( line , f"Name {shadowed!r} shadowed by {value!r}; " "implicit block split" , ) ) overlap . add ( shadowed ) return overlap
Find imported names that overlap existing names for a block of imports.
Find imported names that overlap existing names for a block of imports .
"""
        Find imported names that overlap existing names for a block of imports.

        Compares imports of a proposed, but not yet included, import with existing imports
        in a block. Ignores multiple imports of the same "name" that come from the same
        qualified name. Eg, `os.path` doesn't shadow `os`, but `from foo import os` does.

        Returns a set of qualified names from `imp` that shadow names from `block`.
        This set will be empty if there are no overlaps.
        """
self
block
SortableBlock
imp
SortableImport