Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommend descriptive variable name for discarded values. #846

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
First, thank you for taking your time to contribute to the project.

The following is a set of guidelines for contributing effectively to the Leapp-related repositories
hosted under the `OS and Application Modernization Group organization <https://github.com/oamg/>`_
hosted under the [OS and Application Modernization Group organization](https://github.com/oamg/)
on GitHub.

## Code style guidelines
Expand Down Expand Up @@ -32,7 +32,7 @@ Before you submit your pull request, consider the following guidelines:
``git checkout -b bug/my-fix-branch master``

* Include documentation that either describe a change to a behavior or the changed capability to an end user.
* Commit your changes with message conforming to the `Git Commit Messages`_ guidelines.
* Commit your changes with message conforming to the [Git Commit Messages](#git-commit-messages) guidelines.
* Include tests for the capability you have implemented.
* Make sure your tests pass. We use Jenkins CI for our automated testing.
* Push your branch to GitHub:
Expand Down Expand Up @@ -65,7 +65,7 @@ Before you submit your pull request, consider the following guidelines:
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* If you are fixing a GitHub issue, include something like 'Closes issue #xyz'
* For more best practices, read `How to Write a Git Commit Message <https://chris.beams.io/posts/git-commit/>`_
* For more best practices, read [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)

## Contact

Expand Down
11 changes: 10 additions & 1 deletion docs/source/python-coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,13 @@ class MyActor(Actor):
### 13. Underscore usage

For leapp and leapp-repository the `_` and `P_` is reserved for localization. Please don't use it for anything else like
variable-to-be-discarded.
variable-to-be-discarded. Instead, use a variable name prefixed with `dummy_`. What comes after
the prefix should describe the data that is being discarded, like so:

``` python
dummy_scheme, netloc, path, dummy_params, query, fragment = urlparse("scheme://netloc/path;parameters?query#fragment")
```

Using an informative variable name for discarded values is helpful when a future developer modifies
the code and needs the discarded information. They can quickly see that the information is already
available; they just need to rename the variable and start using it.
Loading