This repository has been archived by the owner on Jul 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
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
ralphbean
added a commit
to fedora-infra/fmn.web
that referenced
this pull request
Aug 22, 2014
This is the UI component for fedora-infra/fmn.lib#12
} | ||
if reify: | ||
result['fn'] = fedmsg.utils.load_class(str(self.code_path)) | ||
return result | ||
|
||
def __repr__(self): | ||
return "<fmn.lib.models.Rule: %r(**%r)>" % ( | ||
self.code_path, self.arguments) | ||
negation = '' or self.negated and '!' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> '' or False and '!'
False
>>> '' or True and '!'
'!'
is it the idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I got it backwards :(
It should be like this:
>>> True and '!' or ''
'!'
>>> False and '!' or ''
''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed in 5f84885
One question on repr, otherwise, 👍 |
As pointed out here: https://github.com/fedora-infra/fmn.lib/pull/12/files#r16629573
👍 for me |
Thanks Pierre! |
ralphbean
added a commit
that referenced
this pull request
Aug 24, 2014
Allow individual rules to be negated.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows you to have a filter that's like:
'send me all messages that have my username associated with them except for meetbot messages'