Added type hinting, optimised PasswordValidator