ONE icon indicating copy to clipboard operation
ONE copied to clipboard

[one-cmds] Revisit naming in python script

Open mhs4670go opened this issue 2 years ago • 3 comments

What

Let's revisit the naming in python script.

Why

Most of function names in python script starts from _ as of now. I did it because I wanted to make them internal function. But, I think it is not good-looking and they doesn't have to be done like that even if they are private function. So, let's revisit them. Also, I'm gonna refactor some small things to make them look better.

  • Remove _ from each function name
  • Move utils.py to onelib and import it as oneutils

mhs4670go avatar Jun 28 '22 09:06 mhs4670go

Q) using _ prefix is not general in python for private functions?

it is not good-looking

I think it's OK :)

doesn't have to be done like that even if they are private function

Is there another way of explicitly expressing like this?

seanshpark avatar Jun 28 '22 21:06 seanshpark

Move utils.py to onelib and import it as oneutils

IMHO, it would be better to split to separate files with file name expressing its purpose not using general Utility

seanshpark avatar Jun 28 '22 21:06 seanshpark

Is there another way of explicitly expressing like this?

AFAIK, no.

IMHO, it would be better to split to separate files with file name expressing its purpose not using general Utility

Yeah, actually, https://github.com/Samsung/ONE/issues/8169 is still being progressed:)

mhs4670go avatar Jun 29 '22 01:06 mhs4670go