Skip to content

Commit a592f97

Browse files
hillaryfraleyfabaff
authored andcommitted
Fixed typos/grammar/format (home-assistant#1120)
1 parent 3d6e64e commit a592f97

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

source/developers/development_testing.markdown

+12-13
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,55 @@ sharing: true
99
footer: true
1010
---
1111

12-
Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) compliance on all code submitted. Every Pull Request is automatically tested with [Coveralls](https://coveralls.io/github/home-assistant/home-assistant) and [Travis CI](https://travis-ci.org/home-assistant/home-assistant) after it is created.
12+
Home Assistant enforces strict [PEP8 style](https://www.python.org/dev/peps/pep-0008/) compliance on all code submitted. We automatically test every pull request with [Coveralls](https://coveralls.io/github/home-assistant/home-assistant) and [Travis CI](https://travis-ci.org/home-assistant/home-assistant).
1313

1414
### {% linkable_title Local testing %}
1515

16-
It's highly recommended to run `tox` before you create your Pull Request to avoid annoying fixes. Local testing requires `tox` to be installed.
16+
**Important:** Run tox before you create your pull request to avoid annoying fixes. Local testing requires installing tox.
1717

1818
```bash
1919
$ pip3 install tox
2020
```
2121

22-
Start the test of your code with `tox`.
22+
Start your code test with `tox`.
2323

2424
```bash
2525
$ tox
2626
```
2727

28-
This will run unit tests against python 3.4 and 3.5 (if both are available locally), as well as run a set of tests which validate `pep8` and `pylint` style of the code.
28+
This will run unit tests against Python 3.4 and 3.5 (if both are available locally), as well as tests that validate `pep8` and `pylint` style.
2929

3030
#### {% linkable_title Testing Tips %}
3131

32-
You can optionally run tests on only one tox target using the `-e` option to select an environment. For instance `tox -e lint` will run the linters only, `tox -e py34` will run unit tests only on python 3.4.
32+
You can run tests on only one tox target -- just use `-e` to select an environment. For example, `tox -e lint` runs the linters only, and `tox -e py34` runs unit tests only on Python 3.4.
3333

34-
Tox uses virtual environments under the hood to create isolated testing environments. The Tox virtual environments will get out date when requirements change causing test errors. Run `tox -r` to create new Tox virtual environments.
34+
tox uses virtual environments under the hood to create isolated testing environments. The tox virtual environments will get out-of-date when requirements change, causing test errors. Run `tox -r` to create new tox virtual environments.
3535

36-
During development on a specific file, it can speed up your workflow to just run tests and linting related to the file that you're working on. To run individual files:
36+
During development on a specific file, speed up your workflow by running tests and linting only for the file that you're working on. To run individual files:
3737

3838
```bash
3939
$ flake8 homeassistant/core.py
4040
$ pylint homeassistant/core.py
4141
$ py.test tests/test_core.py
4242
```
4343

44-
You also run linting tests against all changed files, as reported by `git diff upstream/dev --name-only` using the `lint` script:
44+
You can also run linting tests against all changed files, as reported by `git diff upstream/dev --name-only`, using the `lint` script:
4545

4646
```bash
4747
home-assistant$ script/lint --changed
4848
```
4949

50-
### {% linkable_title Prevent Linter Errors %}
50+
### {% linkable_title Preventing Linter Errors %}
5151

52-
You can save yourself the hassle of extra commits just to fix style errors by enabling the flake8 git commit hook. It will check your code when you attempt to commit to the repository. It will block the commit if there are any style issues, giving you a chance to fix it.
52+
Save yourself the hassle of extra commits just to fix style errors by enabling the Flake8 git commit hook. Flake8 will check your code when you try to commit to the repository and block the commit if there are any style errors, which gives you a chance to fix them!
5353

5454
```bash
5555
$ pip3 install flake8 flake8-docstrings
5656
$ flake8 --install-hook=git
5757
```
5858

59-
The flake8-docstrings extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running flake8.
59+
The `flake8-docstrings` extension will check docstrings according to [PEP257](https://www.python.org/dev/peps/pep-0257/) when running Flake8.
6060

6161
### {% linkable_title Notes on PyLint and PEP8 validation %}
6262

63-
In case a PyLint warning cannot be avoided, add a comment to disable the PyLint check for that line. This can be done using the format `# pylint: disable=YOUR-ERROR-NAME`. Example of an unavoidable PyLint warning is if you do not use the passed in datetime if you're listening for time change.
64-
63+
If you can't avoid a PyLint warning, add a comment to disable the PyLint check for that line with `# pylint: disable=YOUR-ERROR-NAME`. An example of an unavoidable PyLint warning is not using the passed-in datetime if you're listening for a time change.

0 commit comments

Comments
 (0)