Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Apr 28, 2025

We still have the nanosecond granularity issues that we've always had, but this should fix everything else.

We still have the nanosecond granularity issues that we've always had, but this should fix everything else.
@ghost ghost requested a review from smaye81 April 28, 2025 20:40
@ghost ghost marked this pull request as ready for review April 28, 2025 20:44
@ghost ghost enabled auto-merge (squash) April 28, 2025 21:07
# Handle double colon, fill pieces with 0
if self._double_colon_seen:
if len(p16) >= 7:
return 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the return of 0?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because get_bits is supposed to return 0 if the address is invalid.

    def get_bits(self) -> int:
        """Return the 128-bit value of an address parsed through address() or address_prefix().

        Return 0 if no address was parsed successfully.

        """

OTOH, though, it doesn't really matter, so I removed it.

@ghost ghost merged commit 12155fb into main Apr 29, 2025
12 checks passed
@ghost ghost deleted the jchadwick/conformance-fixes branch April 29, 2025 13:56
This pull request was closed.
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.

1 participant