Skip to content

Conversation

bandirevanth
Copy link
Contributor

What have I Changed:

In password_validator.py, I have fixed:

  • Missing return False: Many methods lacked a return False, causing them to return None and break logical checks.
  • Limited special character regex: [_@$] was too restrictive; it excluded many common special characters.
  • Non-PEP8 naming: Method names used CamelCase instead of Pythonic snake_case.
  • Unsafe default argument: list_values used a mutable default (list), which is unsafe.
  • Assumed read_file existence: Used self.read_file() without confirming its presence in BaseValidator.

In array_validator.py, I have fixed:

Fix Description
snake_case method names Replaced isArrayis_array, etc., to follow PEP8 naming conventions
min, max renamed Avoided shadowing Python built-in functions min() and max()
Return guards for non-list inputs Ensured each method checks isinstance(value, list) before proceeding
Handled None in max_length Allowed optional upper bounds in is_array_length
Handled unhashable elements in set() Added fallback logic for unhashable types (like dicts/lists) in uniqueness check

Issue no.(must) - 17

Self Check(Tick After Making pull Request)

  • One Change in one Pull Request
  • I am following clean code and Documentation and my code is well linted with flake8.

Join Us on Discord:- https://discord.gg/JfbK3bS

Signed-off-by: Bandi Revanth <[email protected]>
Signed-off-by: Bandi Revanth <[email protected]>
@codeperfectplus codeperfectplus merged commit 3a3a6b8 into codeperfectplus:main Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants