usort/config.py
def category(self, dotted_import: str) -> Category:
        """
        Given a piece of an import string, return its category for this config.

        You can pass in ".foo" or "pkg.foo.bar" or just "os" and it should
        categorize.
        """
        first_part = dotted_import.split(".")[0]
        if first_part == "":
            # relative import
            return CAT_FIRST_PARTY
        elif first_part in self.known:
            return self.known[first_part]
        else:
            return self.default_category

        Given a piece of an import string, return its category for this config.

        You can pass in ".foo" or "pkg.foo.bar" or just "os" and it should
        categorize.
        
Given a piece of an import string, return its category for this config.
Given a piece of an import string return its category for this config .
def category(self, dotted_import: str) -> Category:
        first_part = dotted_import.split(".")[0]
        if first_part == "":
            return CAT_FIRST_PARTY
        elif first_part in self.known:
            return self.known[first_part]
        else:
            return self.default_category
def category ( self , dotted_import : str ) -> Category : first_part = dotted_import . split ( "." ) [ 0 ] if first_part == "" : return CAT_FIRST_PARTY elif first_part in self . known : return self . known [ first_part ] else : return self . default_category
Given a piece of an import string, return its category for this config.
Given a piece of an import string return its category for this config .
"""
        Given a piece of an import string, return its category for this config.

        You can pass in ".foo" or "pkg.foo.bar" or just "os" and it should
        categorize.
        """ # relative import
self
dotted_import
str