2

I'm trying to rearrange my project files. I'm having some hard time figuring out what is the correct way to name files and folders. I'm relying on PEP8. I see that I should avoid having underscores in file/folder name. But if I have a folder like functionalcoverage it seems weird and feels like I should call it functional_coverage instead and the same goes for files(securecopy.py and secure_copy.py). In addition, I'm not sure if I should adhere to PEP8 regarding folders/files that aren't python(a folder containing a bunch of txt files for example)

2
  • 1
    PEP 8 is a guideline. You are free to follow it or not. In general following it will make things easier but as the PEP 8 itself points out: you project requirements should have precedence over the PEP rules. So if you have a specific question about a rule, please ask. If you just want to hear some opinions on the rules there, then sorry but SO is not the right place for it. Commented Sep 5, 2018 at 15:49
  • 1
    It's more important that your project is internally consistent than that parts of it are consistent with PEP 8. Files (modules) should have underscores to improve readability. You could adopt a more nested structure (if it would make sense for your project), and have coverage.functional instead of functional_coverage Commented Sep 5, 2018 at 15:52

1 Answer 1

2

Its prety much what you prefer, a lot of people use underscore, PEP8 is a guide you can follow or not, the important is to be consistant with your choice read more here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.