Skip to content

Commit 17aa5c8

Browse files
authored
Change Python script arguments from hyphens to underscores (#483)
- --skip-build → --skip_build - --skip-install → --skip_install - --only-check-file-extensions → --only_check_file_extensions - --sharding-instances → --sharding_instances
1 parent 46b5556 commit 17aa5c8

7 files changed

+13
-13
lines changed

Backend-Type-Annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ python -m scripts.run_mypy_checks --files path/file1.py path/file2.py
2525
This runs the type checks on the files specified, i.e., file1 and file2.
2626

2727
**Note:**
28-
- [Helpful trick for faster runs]`python -m scripts.run_mypy_checks --skip-install` can be used to skip installation of third party libraries. Please use the `--skip-install` flag **only** when you already have all the third party libraries installed.
28+
- [Helpful trick for faster runs]`python -m scripts.run_mypy_checks --skip_install` can be used to skip installation of third party libraries. Please use the `--skip_install` flag **only** when you already have all the third party libraries installed.
2929

3030

3131
## Adding type annotations

Backend-tests.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ python -m scripts.run_backend_tests --help
182182

183183
Note that while the tests are running, you may see the word `ERROR` show up in the test logs. This does not necessarily mean that an error has occurred; it happens because some tests actually expect an error to be raised.
184184

185-
If you want to speed up subsequent runs of the tests, use `--skip-install` like this:
185+
If you want to speed up subsequent runs of the tests, use `--skip_install` like this:
186186

187187
```console
188-
python -m scripts.run_backend_tests --skip-install
188+
python -m scripts.run_backend_tests --skip_install
189189
```
190190

191191
You can also combine this flag with the ones mentioned above. For example, you can use it with the `--test-targets` flag for even faster runs like this:
192192
```console
193-
python -m scripts.run_backend_tests --test_targets=core.controllers.editor_test --skip-install
193+
python -m scripts.run_backend_tests --test_targets=core.controllers.editor_test --skip_install
194194
```
195195

196196
Note that this skips reinstalling the required libraries, so remember to run the tests without this flag every once in a while to keep them up to date.

Coding-style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ python -m scripts.linters.run_lint_checks --files file_1 file_2 ... file_n
417417

418418
If you'd like to run the checks for a list of file-types, run the following command:
419419
```bash
420-
python -m scripts.linters.run_lint_checks --only-check-file-extensions file_extension_type_1 file_extension_type_2 ... file_extension_type_n
420+
python -m scripts.linters.run_lint_checks --only_check_file_extensions file_extension_type_1 file_extension_type_2 ... file_extension_type_n
421421
```
422422

423423
### Note for Sublime Text users

End-to-End-Tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ If you run all the E2E tests at once (i.e. if you don't specify a suite), the te
218218

219219
Python:
220220
```console
221-
python -m scripts.run_e2e_tests --sharding-instances=<number of shards>
221+
python -m scripts.run_e2e_tests --sharding_instances=<number of shards>
222222
```
223223

224224
You can disable sharding like this:

Frequently-Asked-Questions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ python -m scripts.linters.run_lint_checks --path=path/to/the/file
3737

3838
Let's say you want to run the linting tests on a specific file type. In the oppia directory, run the following command.
3939

40-
python -m scripts.linters.run_lint_checks --only-check-file-extensions file_extension_type
40+
python -m scripts.linters.run_lint_checks --only_check_file_extensions file_extension_type
4141

4242
### How to test email functionality?
4343
Please refer to [Testing-email-functionality](https://github.com/oppia/oppia/wiki/Testing-email-functionality) for details.

Lint-Checks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ We use linters to check our code for common errors or bad patterns. The Oppia li
6262
5. To lint a specific list of file extensions (separated by spaces):
6363

6464
```console
65-
python -m scripts.linters.run_lint_checks --only-check-file-extensions {{extensions}}
65+
python -m scripts.linters.run_lint_checks --only_check_file_extensions {{extensions}}
6666
```
6767

6868
For example, to lint Python and JavaScript files, you could run this:
6969

7070
```console
71-
python -m scripts.linters.run_lint_checks --only-check-file-extensions py js
71+
python -m scripts.linters.run_lint_checks --only_check_file_extensions py js
7272
```
7373

7474
## Write lint checks

Tutorial-Learn-How-to-Fix-a-CI-Flake-waitFor-Statements.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,16 +354,16 @@ Here’s how:
354354
command: >
355355
VIDEO_RECORDING_IS_ENABLED=0;
356356
xvfb-run -a --server-args="-screen 0, 1285x1000x24"
357-
python -m scripts.run_e2e_tests --skip-install
358-
--skip-build --prod_env
357+
python -m scripts.run_e2e_tests --skip_install
358+
--skip_build --prod_env
359359
```
360360
- You can adjust it to run only the relevant suite by adding the suitable flag, like so:
361361
```yml
362362
command: >
363363
VIDEO_RECORDING_IS_ENABLED=0;
364364
xvfb-run -a --server-args="-screen 0, 1285x1000x24"
365-
python -m scripts.run_e2e_tests --skip-install
366-
--skip-build --suite=additionalEditorFeatures --prod_env
365+
python -m scripts.run_e2e_tests --skip_install
366+
--skip_build --suite=additionalEditorFeatures --prod_env
367367
```
368368
- Now the workflow `step check_test_suites_to_run:
369369
uses: ./.github/workflows/check_test_suites_to_run.yml.`

0 commit comments

Comments
 (0)