Skip to content

Commit 04f156a

Browse files
vivian-daicclauss
andauthored
markdown consistency (TheAlgorithms#4461)
* markdown consistency * Swap ** for __ Co-authored-by: Christian Clauss <[email protected]>
1 parent b3b89d9 commit 04f156a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

CONTRIBUTING.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Before contributing
44

5-
Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms).
5+
Welcome to [TheAlgorithms/Python](https://github.com/TheAlgorithms/Python)! Before sending your pull requests, make sure that you __read the whole guidelines__. If you have any doubt on the contributing guide, please feel free to [state it clearly in an issue](https://github.com/TheAlgorithms/Python/issues/new) or ask the community in [Gitter](https://gitter.im/TheAlgorithms).
66

77
## Contributing
88

@@ -15,9 +15,9 @@ We are very happy that you consider implementing algorithms and data structure f
1515
- Your work will be distributed under [MIT License](LICENSE.md) once your pull request is merged
1616
- You submitted work fulfils or mostly fulfils our styles and standards
1717

18-
**New implementation** is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity but **identical implementation** of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request.
18+
__New implementation__ is welcome! For example, new solutions for a problem, different representations for a graph data structure or algorithm designs with different complexity but __identical implementation__ of an existing implementation is not allowed. Please check whether the solution is already implemented or not before submitting your pull request.
1919

20-
**Improving comments** and **writing proper tests** are also highly welcome.
20+
__Improving comments__ and __writing proper tests__ are also highly welcome.
2121

2222
### Contribution
2323

@@ -33,7 +33,7 @@ An Algorithm is one or more functions (or classes) that:
3333
* take one or more inputs,
3434
* perform some internal calculations or data manipulations,
3535
* return one or more outputs,
36-
* have minimal side effects (Ex. print(), plot(), read(), write()).
36+
* have minimal side effects (Ex. `print()`, `plot()`, `read()`, `write()`).
3737

3838
Algorithms should be packaged in a way that would make it easy for readers to put them into larger programs.
3939

@@ -42,7 +42,7 @@ Algorithms should:
4242
* use Python naming conventions and intuitive variable names to ease comprehension
4343
* be flexible to take different input values
4444
* have Python type hints for their input parameters and return values
45-
* raise Python exceptions (ValueError, etc.) on erroneous input values
45+
* raise Python exceptions (`ValueError`, etc.) on erroneous input values
4646
* have docstrings with clear explanations and/or URLs to source materials
4747
* contain doctests that test both valid and erroneous input values
4848
* return all calculation results instead of printing or plotting them
@@ -66,10 +66,10 @@ pre-commit run --all-files --show-diff-on-failure
6666

6767
We want your work to be readable by others; therefore, we encourage you to note the following:
6868

69-
- Please write in Python 3.7+. For instance: __print()__ is a function in Python 3 so __print "Hello"__ will _not_ work but __print("Hello")__ will.
69+
- Please write in Python 3.7+. For instance: `print()` is a function in Python 3 so `print "Hello"` will *not* work but `print("Hello")` will.
7070
- Please focus hard on naming of functions, classes, and variables. Help your reader by using __descriptive names__ that can help you to remove redundant comments.
71-
- Single letter variable names are _old school_ so please avoid them unless their life only spans a few lines.
72-
- Expand acronyms because __gcd()__ is hard to understand but __greatest_common_divisor()__ is not.
71+
- Single letter variable names are *old school* so please avoid them unless their life only spans a few lines.
72+
- Expand acronyms because `gcd()` is hard to understand but `greatest_common_divisor()` is not.
7373
- Please follow the [Python Naming Conventions](https://pep8.org/#prescriptive-naming-conventions) so variable_names and function_names should be lower_case, CONSTANTS in UPPERCASE, ClassNames should be CamelCase, etc.
7474

7575
- We encourage the use of Python [f-strings](https://realpython.com/python-f-strings/#f-strings-a-new-and-improved-way-to-format-strings-in-python) where they make the code easier to read.
@@ -81,7 +81,7 @@ We want your work to be readable by others; therefore, we encourage you to note
8181
black .
8282
```
8383

84-
- All submissions will need to pass the test __flake8 . --ignore=E203,W503 --max-line-length=88__ before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.
84+
- All submissions will need to pass the test `flake8 . --ignore=E203,W503 --max-line-length=88` before they will be accepted so if possible, try this test locally on your Python file(s) before submitting your pull request.
8585

8686
```bash
8787
python3 -m pip install flake8 # only required the first time
@@ -134,15 +134,15 @@ We want your work to be readable by others; therefore, we encourage you to note
134134
python3 -m doctest -v my_submission.py
135135
```
136136

137-
The use of the Python builtin __input()__ function is **not** encouraged:
137+
The use of the Python builtin `input()` function is __not__ encouraged:
138138

139139
```python
140140
input('Enter your input:')
141141
# Or even worse...
142142
input = eval(input("Enter your input: "))
143143
```
144144

145-
However, if your code uses __input()__ then we encourage you to gracefully deal with leading and trailing whitespace in user input by adding __.strip()__ as in:
145+
However, if your code uses `input()` then we encourage you to gracefully deal with leading and trailing whitespace in user input by adding `.strip()` as in:
146146

147147
```python
148148
starting_value = int(input("Please enter a starting value: ").strip())
@@ -175,8 +175,8 @@ We want your work to be readable by others; therefore, we encourage you to note
175175
- All submissions will be tested with [__mypy__](http://www.mypy-lang.org) so we encourage to add [__Python type hints__](https://docs.python.org/3/library/typing.html) where it makes sense to do so.
176176

177177
- Most importantly,
178-
- **Be consistent in the use of these guidelines when submitting.**
179-
- **Join** [Gitter](https://gitter.im/TheAlgorithms) **now!**
178+
- __Be consistent in the use of these guidelines when submitting.__
179+
- __Join__ [Gitter](https://gitter.im/TheAlgorithms) __now!__
180180
- Happy coding!
181181

182182
Writer [@poyea](https://github.com/poyea), Jun 2019.

0 commit comments

Comments
 (0)