Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelioklv committed Dec 3, 2024
1 parent 49a1aec commit 75d1783
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 7 additions & 5 deletions plaso/parsers/sqlite_plugins/android_viber_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AndroidViberCallEventData(events.EventData):
Attributes:
number (str): phone number.
type (int): type of call, such as: Incoming, or Outgoing.
viber_call_type (int): type of call in Viber app, such as: Audio Call, or Video Call.
viber_call_type (int): type of call in Viber,(Audio Call, or Video Call).
duration (int): number of seconds the call lasted.
start_time (dfdatetime.DateTimeValues): date and time the call was started.
end_time (dfdatetime.DateTimeValues): date and time the call was stopped.
Expand Down Expand Up @@ -45,11 +45,12 @@ class AndroidViberCallPlugin(interface.SQLitePlugin):
DATA_FORMAT = 'Android Viber call history SQLite database (viber_data) file'

REQUIRED_STRUCTURE = {
'calls': frozenset(['_id', 'date', 'number', 'duration', 'type', 'viber_call_type'])}
'calls': frozenset(['_id', 'date', 'number', 'duration', 'type',
'viber_call_type'])}

QUERIES = [
('SELECT _id AS id, date, number, duration, type, viber_call_type FROM calls',
'ParseViberCallsRow')]
('SELECT _id AS id, date, number, duration, type, '
'viber_call_type FROM calls', 'ParseViberCallsRow')]

SCHEMAS = [{
'blockednumbers': (
Expand Down Expand Up @@ -123,7 +124,8 @@ def ParseViberCallsRow(self, parser_mediator, query, row, **unused_kwargs):
event_data.type = self._GetRowValue(query_hash, row, 'type')
event_data.duration = duration
event_data.number = self._GetRowValue(query_hash, row, 'number')
event_data.viber_call_type = self._GetRowValue(query_hash, row, 'viber_call_type')
event_data.viber_call_type = (
self._GetRowValue(query_hash, row, 'viber_call_type'))
event_data.start_time = dfdatetime_java_time.JavaTime(timestamp=timestamp)

if duration:
Expand Down
3 changes: 1 addition & 2 deletions tests/parsers/sqlite_plugins/android_viber_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import unittest

from plaso.parsers.sqlite_plugins import android_viber_call

from tests.parsers.sqlite_plugins import test_lib
from plaso.parsers.sqlite_plugins import android_viber_call


class AndroidViberCallSQLitePluginTest(test_lib.SQLitePluginTestCase):
Expand Down

0 comments on commit 75d1783

Please # to comment.