dduk-ddak / coding-night-live

Web-based Communication Application for Codelabs
Other
62 stars 11 forks source link

Refactoring lines that are too long #99

Closed taeseunglee closed 7 years ago

taeseunglee commented 7 years ago

https://github.com/dduk-ddak/coding-night-live/blob/master/manage_chat/consumers.py#L18 https://github.com/dduk-ddak/coding-night-live/blob/master/manage_chat/consumers.py#L42 등등...

punkyoon commented 7 years ago

현실적으로 줄일 수 있나요? 줄인다면 어떤 부분을 줄이는게 좋을까요?

taeseunglee commented 7 years ago

앗 ㅠㅠ issue 제목을 너무 잘못 적었나요...? 한 라인이 80캐릭터를 넘어서(i.e. 너무 길어서) 파라미터를 한 줄에서 여러 줄으로 바꾸는 것을 진행하고자 하려 했어요!

punkyoon commented 7 years ago

파라미터가 너무 많다고 하는줄 알았어요 ㅋㅋ

juice500ml commented 7 years ago

travis.ci에서 flake를 다시 좀 빡세게 적용시킬까요? 어떻게생각하세용~ @punkyoon

punkyoon commented 7 years ago

@juice500ml 네~ 몇가지 예외로 둿던 것들 빼면 될 것 같아요!

juice500ml commented 7 years ago

https://github.com/dduk-ddak/coding-night-live/blob/master/.travis.yml 여기서 flake로 check할 때 ignore을 몇 개 했어요! 여기서 뭘 다시 넣는게 좋을까요? @taeseunglee

taeseunglee commented 7 years ago

E501을 ignore에서 빼서 글자수 80글자 못넘게 하는 게 좋을 것 같아요!

그리고 F841이 쓰이지 않는 변수에 대해서 경고 띄워주던데 (local variable '변수이름' is assigned to but never used), 특별한 이유가 없다면 ignore option에서 빼주는 게 좋을 것 같아요.

juice500ml commented 7 years ago

좋아요~ 이번 이슈에서는 E501만 고칠까요?

taeseunglee commented 7 years ago

네~

punkyoon commented 7 years ago

acd0771e4863a218ba5c80e3aeca6c8369bdc5e1

라인 캐릭터를 최대한 줄일 수 있는대로 줄여봤는데..

/manage_room/consumers.py#L284 같은 친구들은

...
            cache.set(
                "%s/%s" % (message["room"], message["id"]),
                slide.md_blob,
                timeout=60
            )
...

이런식으로 줄여줘야겠죠..?

juice500ml commented 7 years ago

좋은듯요~.~

punkyoon commented 7 years ago

f6835a50fd34a5bdaa349eb516293b7b39e9beaa

E501은 아니지만, 2가지 부분에 대해서 해결해두었습니다.

punkyoon commented 7 years ago

E501에 해당하는 라인들에 대해서 살펴보았는데..

이 상태에서 더 줄이면 오히려 가독성이 떨어질 것 같다는 개인적인 생각이 들었습니다.

그리고 그동안 많은 라인들에 대해서 줄여왔고, flake8로 걸러지는 대부분의 이슈를 해결했기 때문에 가독성이 이전에 비해 상당히 높아졌다고 생각합니다.

다들 E501에 해당하는 라인들에 대해 살펴보시고, 더 줄여야겠다는 생각이 드시면 최대한(...)으로 줄여보고 이슈를 닫겠습니다.

@taeseunglee @juice500ml @minhoryang

minhoryang commented 7 years ago

E501에 글자 수 제한을 80자가 아니라 120자로 풀면 어떨까요?

minhoryang commented 7 years ago

103, #104 리뷰해주세요!