Closed eat-sleep-code closed 7 years ago
No specific reason, except different persons with different styles contributing to the code. There is no PiSupply coding style document (yet?).
Regards
Ton PS Is your MLB program working as you want now with this change?
On Tue, Jul 25, 2017 at 5:10 PM, eat-sleep-code notifications@github.com wrote:
I note in the code, that there seems to be an inconsistency in variable format?
For example:
def UpdateText(self, Id, newText, font_path='/usr/share/fonts/ truetype/freefont/FreeMono.ttf')
Here there appears to be 3+ different variable formats:
self and newText appear to be CamelCased. Id appears to be PascalCased font_path appears to be -- yeah, I don't know what you call that, underscoreCased?
Is there a reason for this?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/143, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJE7gfvFW9RyW5XrVKnoWCLcKkO7raWks5sRgNUgaJpZM4Oir1n .
Other than the preceding space issue (will look into that tonight).
Yeah we're not too picky here about that stuff. I guess we're not purists like that. I'm not a software engineer though, I'm sure if I was it would probably bug me a little.
Happy to decide on one if you wish @tvoverbeek but seems like extra work for no real gain to me.
What do you think also @francesco-vannini ?
On 25 Jul 2017 6:11 pm, "eat-sleep-code" notifications@github.com wrote:
Other than the preceding space issue (will look into that tonight).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PaPiRus/issues/143#issuecomment-317804150, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNCugDq61XpN8wA_eep7RNCCXaxlbT3ks5sRiG1gaJpZM4Oir1n .
It is just the OCD in me. From a code-maintainability aspect, it is definitely easier to follow if it is consistent. Plus, I wanted to know which one I should use if I wanted to make any tweaks.
See pull request that fixes this and a couple other issues.
Merged PR #144. Closing issue.
I note in the code, that there seems to be an inconsistency in variable format?
For example:
def UpdateText(self, Id, newText, font_path='/usr/share/fonts/truetype/freefont/FreeMono.ttf')
Here there appears to be 3+ different variable formats:
self
andnewText
appear to be CamelCased.Id
appears to be PascalCasedfont_path
appears to be -- yeah, I don't know what you call that, underscoreCased?Is there a reason for this?