sanskrit-lexicon / csl-corrections

Replacement for sanskrit-lexicon/CORRECTIONS. User corrections to sanskrit-lexicon/csl-orig
GNU General Public License v3.0
0 stars 0 forks source link

python coding : spaces or tabs #11

Closed funderburkjim closed 11 months ago

funderburkjim commented 4 years ago

In running upload_github_issue.py, the following error showed (in Python3) TabError: inconsistent use of tabs and spaces in indentation

This is because @drdhaval2785 and I have different habits in entering Python code. Dhaval uses tabs for indentation. I use spaces.

When I modified Dhaval's code, my editor (EMACS) used spaces to align the Python code, so the code was aligned to the eye.

Both are legal, but intermixing them results in problems like above.

According to https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces, Spaces are the preferred indentation method.

Thus, I suggest we stick to spaces.

My habit is to use 1 space for indentation. The same reference says Use 4 spaces per indentation level.
So I am not following this suggestion.

If both of us use spaces only, we can differ in the number of spaces for indentation without any problem. i.e., if Dhaval starts a piece of code using 4 spaces for each indentation level, then I'll stick to that if I modify his file. Similarly, If I start a piece of code with 1 space for each indentation, Dhaval can modify the code using my convention.

@drdhaval2785 Agree?

At the moment, I have NOT changed the tabs in upload_github_issue.py. I'll leave this to Dhaval, since he started this code.

drdhaval2785 commented 4 years ago

I agree.