-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Ruff for format and linting (#201)
And use pyupgrade to modernize code. Signed-off-by: Inada Naoki <[email protected]>
- Loading branch information
Showing
13 changed files
with
582 additions
and
556 deletions.
There are no files selected for viewing
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 +1 @@ | ||
__version__ = '0.10.1dev1' | ||
__version__ = "0.10.1dev1" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import time | ||
|
||
from fluent import sender | ||
|
||
|
||
class Event(object): | ||
class Event: | ||
def __init__(self, label, data, **kwargs): | ||
assert isinstance(data, dict), 'data must be a dict' | ||
sender_ = kwargs.get('sender', sender.get_global_sender()) | ||
timestamp = kwargs.get('time', int(time.time())) | ||
assert isinstance(data, dict), "data must be a dict" | ||
sender_ = kwargs.get("sender", sender.get_global_sender()) | ||
timestamp = kwargs.get("time", int(time.time())) | ||
sender_.emit_with_time(label, timestamp, data) |
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.