dfe-analytical-services / dfe-analytical-services/eesyapi.py

How to manage code styling / linting in the package

Open
#5 0 comments 0 reactions 1 assignee Claimed by @Jireland2803 View on GitHub
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Description

How to maintain clean code format:
- Meaningful variable names
- Commenting
- Blank spaces
- Use snake_case or CamelCase
- Testing

### Solutions considered

#### pylint

To lint Python code, you can use Pylint.
1. Run Pylint against a Python file or a module. For example, to lint a single file: pylint your_script.py. For linting an entire Python package: pylint your_package/.
2. Pylint will analyze the code and output a report detailing various issues, categorized by their nature (e.g., errors, warnings, refactor suggestions).
3. You can also lint Python code in Visual Studio Code by searching the VS Code Marketplace for the linter extension of your choice

https://pypi.org/project/pylint/

#### Black

1. Black has built in compatibility with pylint, meaning we could use them both together.

https://pypi.org/project/black/

pylint and black are commonly used in continuous integration.
### Why this is important?

maintainability.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.