question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add correct lambda function argument name

See original GitHub issue

Describe the bug In most of the places we are using it for the lambda function argument. it is not readable and not helps to understand what it represents.

Expected behavior Look for the below-mentioned test files and Replace it with the correct names

Additional context Kotlin lambda function - https://kotlinlang.org/docs/lambdas.html#higher-order-functions

How to work on this issue Comment below “I want to work on [FILE_NAME]”, mention the file name from the above list you want to work on. Please work on only one file at a time.

Note: Don’t assign this issue to anyone as this issue should be done in a multiple PR fashion “single file, single PR”

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jonathanalvares9009commented, Mar 10, 2021

I would like to work on PromotedStoryViewModelTest. Can I start with it?

1reaction
anandwana001commented, Mar 4, 2021

I would like a bit more information on what would be correct as far as what we are renaming it to. Is there an objective correct name or is this something that we’re coming up with?

@nskirkey Taking an example from TopicSummaryViewModelTest https://github.com/oppia/oppia-android/blob/1711a35d59b3fed1a9a16903360b502e58bca8fb/app/src/sharedTest/java/org/oppia/android/app/home/TopicSummaryViewModelTest.kt#L99 It’s not readable just reading this line of code that what we are passing in the function, but if we look this code in the Android Studio we get the suggestions Screenshot 2021-03-04 at 06 42 01 either we can use the suggestion or if you have anything better and more understandable term we can use, you can send a draft PR for review.

it.onActivity {
        setUpTestFragment(it)
}

it.onActivity { homeFragmentTestActivity ->
        setUpTestFragment(homeFragmentTestActivity)
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Python Lambda Functions
The lambda function above is defined and then immediately called with two arguments ( 2 and 3 ). It returns the value 5...
Read more >
Python Lambda Functions with EXAMPLES - Guru99
A Lambda Function in Python programming is an anonymous function or a function having no name. It is a small and restricted function...
Read more >
Lambda Functions and Anonymous Functions in Python
The lambda keyword is used to define an anonymous function in Python. ... The variable name becomes the function name so that We...
Read more >
Lambda Function in Python – Example Syntax - freeCodeCamp
The syntax of a lambda function is lambda args: expression . You first write the word lambda , then a single space, then...
Read more >
How To Use Python Lambda Functions - KnowledgeHut
The function adds 1 to the argument. Since lambda function is an expression, you are allowed to name it whatever you want.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found