Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5359 from willkg/1383113-getitem-mozilla
bug 1383113: switch mozilla processor rules to getitem notation
- Loading branch information
Showing
10 changed files
with
515 additions
and
557 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
# NOTE(willkg): This is a duplicate of Socorro's WHATEVER, but it allows | ||
# the signature generation code to stand alone. | ||
|
||
from functools import total_ordering | ||
|
||
|
||
@total_ordering | ||
class EqualAnything(object): | ||
def __eq__(self, other): | ||
return True | ||
|
||
def __lt__(self, other): | ||
return True | ||
|
||
|
||
#: Sentinel that is equal to anything; simplifies assertions in cases where | ||
#: part of the value changes from test to test | ||
WHATEVER = EqualAnything() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
from functools import total_ordering | ||
|
||
|
||
@total_ordering | ||
class EqualAnything(object): | ||
def __eq__(self, other): | ||
return True | ||
|
||
def __lt__(self, other): | ||
return True | ||
|
||
|
||
#: Sentinel that is equal to anything; simplifies assertions in cases where | ||
#: part of the value changes from test to test | ||
WHATEVER = EqualAnything() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.