Skip to content

Commit bd3e85c

Browse files
author
surbhi
committed
fix lint
1 parent 0bded4a commit bd3e85c

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/bitmessagekivy/baseclass/network.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
class NetworkStat(Screen):
2525
"""NetworkStat class for Kivy UI"""
2626

27-
text_variable_1 = StringProperty(f'Total Connections::0')
27+
text_variable_1 = StringProperty(f'Total Connections::0') # noqa: E999
2828
text_variable_2 = StringProperty(f'Processed 0 peer-to-peer messages')
2929
text_variable_3 = StringProperty(f'Processed 0 broadcast messages')
3030
text_variable_4 = StringProperty(f'Processed 0 public keys')

src/bitmessagekivy/baseclass/payment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_free_credits(self, instance): # pylint: disable=unused-argument
3636
toast('Credit added to your account!')
3737
# TODO: There is no sc18 screen id is available,
3838
# need to create sc18 for Credits screen inside main.kv
39-
App.get_running_app().root.ids.sc18.ids.cred.text = f'{self.kivy_state.available_credit}'
39+
App.get_running_app().root.ids.sc18.ids.cred.text = f'{self.kivy_state.available_credit}' # noqa: E999
4040

4141

4242
class Category(BoxLayout, RectangularElevationBehavior):

src/bitmessagekivy/baseclass/popup.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
logger = logging.getLogger('default')
2424

2525

26+
def format_time(timeinseconds):
27+
"""Format the timestamp into a readable string"""
28+
time_obj = datetime.fromtimestamp(int(timeinseconds))
29+
return time_obj.strftime("%d %b %Y, %I:%M %p")
30+
31+
2632
class AddressChangingLoader(Popup):
2733
"""Run a Screen Loader when changing the Identity for Kivy UI"""
2834

@@ -199,14 +205,9 @@ def assignDetail(self, to_addr, from_addr, timeinseconds):
199205
"""Assign details to the popup"""
200206
self.to_addr = to_addr
201207
self.from_addr = from_addr
202-
self.time_tag = self.format_time(timeinseconds)
208+
self.time_tag = format_time(timeinseconds)
203209
self.adjust_popup_height(to_addr)
204210

205-
def format_time(self, timeinseconds):
206-
"""Format the timestamp into a readable string"""
207-
time_obj = datetime.fromtimestamp(int(timeinseconds))
208-
return time_obj.strftime("%d %b %Y, %I:%M %p")
209-
210211
def adjust_popup_height(self, to_addr):
211212
"""Adjust the height of the popup based on the address length"""
212213
device_type = 2 if platform == 'android' else 1.5

0 commit comments

Comments
 (0)