Code Monkey home page Code Monkey logo

Comments (2)

 avatar commented on August 16, 2024

https://travis-ci.com/github/nekokatt/hikari/jobs/385663836
https://travis-ci.com/github/nekokatt/hikari/jobs/385663837

Seems to be more prevalent on ARM devices.

From that traceback it just looks like however you are comparing the two mappings is considering insertion order or something.

AssertionError: assert <hikari.utili...xffffa41dce50> == {'bash': 'bun...om': 'buebue'}

I'd suggest changing that dict around in order and seeing what happens maybe.

def __eq__(self, other):
    if not isinstance(other, typing.Mapping):  # slow?
        return False
    if len(other) != len(self):
        return False
    for key in self:
        if key not in other:
            return False
    return True

would probably fix this tbf.

from hikari.

 avatar commented on August 16, 2024

https://github.com/python/cpython/blob/3.8/Lib/_collections_abc.py#L685-L687 implies the __eq__ you are deriving is considering if items() == items().

ItemsView does not implement a custom __eq__ by the looks, nor inherit one other than for object.

My suggestion would probably be to either override __eq__ in https://github.com/nekokatt/hikari/blob/master/hikari/utilities/mapping.py#L51 or implement a custom ItemsView, KeysView, ValuesView. First is probably a better thing to do IMHO.

from hikari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.