I tried this and that and was surprised that both methods work and give the same result. But there must be some sense in the difference in spelling, right?
rect = pg.rect.Rect(x, y, width, height)
rect = pg.Rect(x, y, width, height)
def draw():
draw.rect(screen, color, rect)