Skip to content

Commit 794d64c

Browse files
authored
Merge pull request python-gitlab#778 from python-gitlab/docs/readme-code-format
docs(readme): add more info about commitlint, code-format
2 parents 290e5ed + 286f703 commit 794d64c

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.rst

+22-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
.. image:: https://img.shields.io/gitter/room/python-gitlab/Lobby.svg
1414
:target: https://gitter.im/python-gitlab/Lobby
15+
16+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
17+
:target: https://github.com/python/black
1518

1619
Python GitLab
1720
=============
@@ -91,10 +94,27 @@ You can contribute to the project in multiple ways:
9194
* Add unit and functional tests
9295
* Everything else you can think of
9396

94-
We prefer commit messages to be formatted using the `conventional-changelog <https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines>`_.
97+
We enforce commit messages to be formatted using the `conventional-changelog <https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines>`_.
9598
This leads to more readable messages that are easy to follow when looking through the project history.
9699

97-
Provide your patches as github pull requests. Thanks!
100+
Please provide your patches as github pull requests. Thanks!
101+
102+
Code-Style
103+
----------
104+
105+
We use black as code formatter, so you'll need to format your changes using the
106+
`black code formatter
107+
<https://github.com/python/black>`_.
108+
109+
Just run
110+
111+
.. code-block:: bash
112+
113+
cd python-gitlab/
114+
pip3 install --user black
115+
black .
116+
117+
to format your code according to our guidelines.
98118

99119
Running unit tests
100120
------------------

0 commit comments

Comments
 (0)