You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://bestpractices.coreinfrastructure.org/projects/7046)
Copy file name to clipboardExpand all lines: docs/source/developer_guide.rst
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -256,25 +256,25 @@ Except from the functional requirements (see :ref:`Tests`) for changes in the co
256
256
These will also be checked in our CI process for each Pull Request.
257
257
258
258
1. **Code formatting:**
259
-
To ensure that your Pull Request may get accepted, make sure that the code is formatted with ``black``.
259
+
To ensure that your Pull Request may get accepted, make sure that the code is formatted with ``ruff format``.
260
260
We provide a helper script (``scripts/format.sh``) that will format every file in the correct manner.
261
261
To test it locally you can use ``scripts/check-format.sh``.
262
262
263
-
2. **Docstring style:**
264
-
Make sure to check whether every of your new functions has a docstring.
265
-
We decided to use Google-docstring style to be used in our project.
266
-
You can use `pydocstyle` to check if everything is correct locally.
267
-
268
-
3. **Type Hints:**
263
+
2. **Type Hints:**
269
264
We decided that every function, parameter, return value, etc. should be annotated with type hints, as they make it clearer for users what to expect and what is needed.
270
265
For ensuring that no type hint is forgotten we use ``MyPy``.
271
266
This can be checked locally via ``python3 -m mypy --config-file mypy.ini pedpy/``
272
267
273
-
4. **Linting:**
268
+
3. **Linting:**
274
269
Linting in Python is an important process that helps ensure that our code is consistent and adheres to best practices.
275
-
Linting tools like ``pylint`` analyze our code for potential errors, bad practices, and code smells.
270
+
Linting tools like ``ruff`` analyze our code for potential errors, bad practices, and code smells.
276
271
This helps us catch issues early on and prevents them from becoming bigger problems down the line.
277
272
273
+
4. **Docstring style:** (included in linting)
274
+
Make sure to check whether every of your new functions has a docstring.
275
+
We decided to use Google-docstring style to be used in our project.
276
+
You can use `ruff` to check if everything is correct locally.
277
+
278
278
If you want to run the same tests as in the CI pipeline, you can use ``scripts/ci.sh``.
0 commit comments