Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix instance comparison in AbsMax and AbsMin classes #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sunnynguyen-ai wants to merge 2 commits into python-validators:master
base: master
Choose a base branch
Loading
from sunnynguyen-ai:fix-bugs-001

Conversation

@sunnynguyen-ai
Copy link

@sunnynguyen-ai sunnynguyen-ai commented Sep 26, 2025

Bug Fix

Fixed incorrect comparison logic in AbsMax and AbsMin classes.

Changes

  • Changed other is not AbsMax to not isinstance(other, AbsMax)
  • Changed other is not AbsMin to not isinstance(other, AbsMin)

Impact

  • Fixes behavior when comparing instances of the same class
  • Ensures between() validator works correctly with default parameters

Sunny Nguyen added 2 commits September 26, 2025 12:11
- Changed identity comparison (is not) to instance checking (isinstance)
 - Fixes incorrect behavior when comparing instances of same class
- Extract IP address part from CIDR notation before checking if private
- Fixes validation of addresses like "192.168.1.0/24" with private parameter
- Prevents incorrect private/public detection when subnet mask is included
Copy link
Collaborator

I'm afraid, I do not see the need for change.

@yozachar yozachar added the waiting Issue/PR: Wating for reply label Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

waiting Issue/PR: Wating for reply

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /