yt-dislikes icon indicating copy to clipboard operation
yt-dislikes copied to clipboard

Style improvements

Open trag1c opened this issue 3 years ago • 3 comments

  • Converted camelCase to snake_case, since that's the recommended naming convention for Python.
  • Removed redundant float casts on L64 (since / in Python always returns a float and doesn't need casting like Java)
  • Refactored text_original to look a bit cleaner

trag1c avatar Nov 13 '21 18:11 trag1c

Thanks for contributing! I'll test this out on Monday - don't have time to this weekend. And what's funny is that the YouTube Data API documentation used camelCase in all of their Python examples, so I didn't even think to question it - not that I would've, being a Java dev and all lol.

ForrestKnight avatar Nov 13 '21 20:11 ForrestKnight

Thanks for contributing! I'll test this out on Monday - don't have time to this weekend. And what's funny is that the YouTube Data API documentation used camelCase in all of their Python examples, so I didn't even think to question it - not that I would've, being a Java dev and all lol.

I just twigged too late that this PR already made changes to text original, using f string for expression insertions etc., it's basically the same, however, if you have ( ) params with a string on each newline, without being comma delimited as well, you don't need to call .join on it, the concatenation is automatic. I'm off to bed, but maybe update this PR if you want with the same changes, and delete my PR :). idk

tauraamui avatar Nov 14 '21 00:11 tauraamui

if you have ( ) params with a string on each newline, without being comma delimited as well, you don't need to call .join on it, the concatenation is automatic

I'm aware of this but thought that not including \n in the strings and using str.join instead would look slightly nicer :)

trag1c avatar Nov 14 '21 21:11 trag1c