Skip to content
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

Fix broken __eq__ implementation of Netbox stub class #3226

Merged
merged 3 commits into from
Nov 24, 2024

Conversation

lunkwill42
Copy link
Member

Fixes #3225

This stub class cannot reasonably expect to always be compared to other
values of the same class.  In fact, most of the time, it will be
compared to instances of the real class that it is stubbing.

Since the comparison is mostly about verifying that the `sysname`
attribute has the same value, this changes the implementation to be
more lenient to avoid stupid crash bugs (and this fixes the broken
regression tests introduced by the parent commit)
Copy link

sonarcloud bot commented Nov 20, 2024

Copy link

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 993 0 13.04s
✅ PYTHON ruff 988 0 0.1s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

Test results

    9 files      9 suites   8m 11s ⏱️
2 141 tests 2 141 ✅ 0 💤 0 ❌
4 021 runs  4 021 ✅ 0 💤 0 ❌

Results for commit a92583a.

@lunkwill42 lunkwill42 merged commit 6bc8e0a into master Nov 24, 2024
12 checks passed
@lunkwill42 lunkwill42 deleted the bugfix/netmap-stub-netbox-eq-fix branch November 24, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants