Merge pull request #27 from cis-navjot-g/codequalitykivy

Codequalitykivy
This commit is contained in:
lakshyacis 2019-09-17 12:45:39 +05:30 committed by GitHub
commit 506a83843c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -612,14 +612,16 @@ class MyTextInput(TextInput):
class Payment(Screen): class Payment(Screen):
"""Payment Method.""" """Payment Method."""
def get_available_credits(self, instance): def get_available_credits(self, instance): # pylint: disable=no-self-use
"""Method helps to get the available credits"""
state.availabe_credit = instance.parent.children[1].text state.availabe_credit = instance.parent.children[1].text
existing_credits = state.kivyapp.root.ids.sc18.ids.ml.children[0].children[0].children[0].children[0].text existing_credits = state.kivyapp.root.ids.sc18.ids.ml.children[0].children[0].children[0].children[0].text
if len(existing_credits.split(' ')) > 1: if len(existing_credits.split(' ')) > 1:
toast('We already have added free coins for the subscription to your account!') toast('We already have added free coins for the subscription to your account!')
else: else:
toast('Coins added to your account!') toast('Coins added to your account!')
state.kivyapp.root.ids.sc18.ids.ml.children[0].children[0].children[0].children[0].text = '{0}'.format(state.availabe_credit) state.kivyapp.root.ids.sc18.ids.ml.children[0].children[0].children[
0].children[0].text = '{0}'.format(state.availabe_credit)
class Credits(Screen): class Credits(Screen):
@ -1469,7 +1471,7 @@ class NavigationDrawerTwoLineListItem(
def _update_specific_text_color(self, instance, value): def _update_specific_text_color(self, instance, value):
pass pass
def _set_active(self, active, list): def _set_active(self, active, list): # pylint: disable=redefined-builtin
pass pass