def draw_selection_box(self):
        """Draw selection box rect on the screen.

        That is, if its smallest dimension is at least
        4 pixels.
        """
        ### XXX the size check below wasn't previously
        ### needed in pygame 1 (at least not in the
        ### version I used), but in pygame 2 drawing
        ### a rect with a dimension too small causes
        ### a weird shape to be drawn instead, so we
        ### added this limitation;
        ###
        ### this is also taken into account when
        ### finishing selecting, where we do not perform
        ### the selection if the selection box is so
        ### small that it isn't drawn; this is probably
        ### the best/less confusing behaviour, since
        ### the selection box isn't visible anyway;
        ###
        ### I also checked the pygame github and saw
        ### that the issue was already reported;

        ### leave the method before drawing the selection
        ### box if its smallest dimension is less than
        ### 4 pixels

        if min(self.selection_box.size) < 4:
            return

        ### otherwise we draw the selection box

        draw_rect(SCREEN, NORMAL_SELECTION, self.selection_box, 2)
Draw selection box rect on the screen.

        That is, if its smallest dimension is at least
        4 pixels.
        
nodezator/editing/selection.py