@with_formatter(format_kinds)<EOL><INDENT>def query_kinds(self, kind):<DEDENT>
logging.debug(_('<STR_LIT>'), kind)<EOL>if kind is None:<EOL><INDENT>return self._kind_id_to_name.items()<EOL><DEDENT>if kind.isdigit():<EOL><INDENT>kind_name = self.kind_id_to_name(int(kind))<EOL>if kind_name:<EOL><INDENT>kind = (kind, kind_name)<EOL><DEDENT>else:<EOL><INDENT>logging.warning(_('<STR_LIT>'), kind)<EOL>kind = None<EOL><DEDENT><DEDENT>else:<EOL><INDENT>kind_id = self.kind_name_to_id(kind)<EOL>if kind_id:<EOL><INDENT>kind = (kind_id, kind)<EOL><DEDENT>else:<EOL><INDENT>logging.warning(_('<STR_LIT>'), kind)<EOL>kind = None<EOL><DEDENT><DEDENT>return [kind]<EOL>
Query kinds.