On Being Stylish
Your PR cannot be accepted if you don't follow our corporate style guide.
Start file
def fun(challenge, my_state, goal): """ Wrapper around library magicks, there must be a better way to do this... """ d = { "s_var": my_state.thing, "g_var": goal.state, } # TODO, break these lines up to fit our style guide long_yet_appropriately_precise_variable_name = lib.Magic(challenge.attribute, challenge.d["count"] - 1, descriptor=d) breakable_line = lib.Miscellaneous.ArcaneFactory.Magic(s_var=int(my_state.thing), g_var=int(goal.state), n=1, strict=True) return long_yet_appropriately_precise_variable_name
End file
def fun(challenge, my_state, goal): """ Wrapper around library magicks, there must be a better way to do this... """ d = { "s_var": my_state.thing, "g_var": goal.state, } # TODO, break these lines up to fit our style guide long_yet_appropriately_precise_variable_name = lib.Magic( challenge.attribute, challenge.d["count"] - 1, descriptor=d ) breakable_line = lib.Miscellaneous.ArcaneFactory.Magic( s_var=int(my_state.thing), g_var=int(goal.state), n=1, strict=True ) return long_yet_appropriately_precise_variable_name
View Diff
11,12c11,21 < long_yet_appropriately_precise_variable_name = lib.Magic(challenge.attribute, challenge.d["count"] - 1, descriptor=d) < breakable_line = lib.Miscellaneous.ArcaneFactory.Magic(s_var=int(my_state.thing), g_var=int(goal.state), n=1, strict=True) --- > long_yet_appropriately_precise_variable_name = lib.Magic( > challenge.attribute, > challenge.d["count"] - 1, > descriptor=d > ) > breakable_line = lib.Miscellaneous.ArcaneFactory.Magic( > s_var=int(my_state.thing), > g_var=int(goal.state), > n=1, > strict=True > )
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 20 remaining solutions by signing in and submitting your own entry
#21 Jurica / @Jurica34581259 - Score: 90 - 11/16/18 @ 17:01
/(<CR>nli<CR><Esc>$i<CR><Esc>k:s/, /,\r /g<CR><Esc>kk0i <Esc>/(<CR>a<CR> <Esc>0llll$i<CR><BS> <Esc>k:s/, /,\r /g<CR>ZZ
0 comments