Remove FIXMEs

This commit is contained in:
Florian Bruhin 2018-02-27 12:59:45 +01:00
parent 244590f49d
commit 3a79f1293f

View File

@ -290,6 +290,9 @@ class KeySequence:
This internally uses chained QKeySequence objects and exposes a nicer This internally uses chained QKeySequence objects and exposes a nicer
interface over it. interface over it.
NOTE: While private members of this class are in theory mutable, they must
not be mutated in order to ensure consistent hashing.
Attributes: Attributes:
_sequences: A list of QKeySequence _sequences: A list of QKeySequence
@ -344,7 +347,6 @@ class KeySequence:
return self._sequences != other._sequences return self._sequences != other._sequences
def __hash__(self): def __hash__(self):
# FIXME is this correct?
return hash(tuple(self._sequences)) return hash(tuple(self._sequences))
def __len__(self): def __len__(self):
@ -371,7 +373,6 @@ class KeySequence:
def matches(self, other): def matches(self, other):
"""Check whether the given KeySequence matches with this one.""" """Check whether the given KeySequence matches with this one."""
# FIXME test this
# pylint: disable=protected-access # pylint: disable=protected-access
assert self._sequences assert self._sequences
assert other._sequences assert other._sequences
@ -396,8 +397,6 @@ class KeySequence:
In addition, Shift also *is* relevant when other modifiers are In addition, Shift also *is* relevant when other modifiers are
involved. involved.
Shift-Ctrl-X should not be equivalent to Ctrl-X. Shift-Ctrl-X should not be equivalent to Ctrl-X.
FIXME: create test cases!
""" """
modifiers = ev.modifiers() modifiers = ev.modifiers()
@ -416,7 +415,6 @@ class KeySequence:
"""Parse a keystring like <Ctrl-x> or xyz and return a KeySequence.""" """Parse a keystring like <Ctrl-x> or xyz and return a KeySequence."""
# pylint: disable=protected-access # pylint: disable=protected-access
# FIXME: test stuff like <a, a> # FIXME: test stuff like <a, a>
# FIXME make sure all callers handle KeyParseError
new = cls() new = cls()
strings = list(_parse_keystring(keystr)) strings = list(_parse_keystring(keystr))
for sub in utils.chunk(strings, cls._MAX_LEN): for sub in utils.chunk(strings, cls._MAX_LEN):