@@ -22,7 +22,7 @@ This section covers guidelines for Python samples. Note that
22
22
23
23
### Folder Location
24
24
25
- Samples that primarily show the use of one client library should be placed in the
25
+ Samples that primarily show the use of one client library should be placed in the
26
26
client library repository. Other samples should be placed in this repository
27
27
` python-docs-samples ` .
28
28
@@ -100,6 +100,20 @@ local variables” warnings.
100
100
The use of [ Black] ( https://pypi.org/project/black/ ) to standardize code
101
101
formatting and simplify diffs is recommended, but optional.
102
102
103
+ The default noxfile has ` blacken ` session for convenience. Here are
104
+ some examples.
105
+
106
+ If you have pyenv configured:
107
+ ``` sh
108
+ nox -s blacken
109
+ ```
110
+
111
+ If you only have docker:
112
+ ```
113
+ cd proj_directory
114
+ ../scripts/run_tests_local.sh . blacken
115
+ ```
116
+
103
117
In addition to the syntax guidelines covered in PEP 8, samples should strive
104
118
to follow the Pythonic philosophy outlined in the
105
119
[ PEP 20 - Zen of Python] ( https://www.python.org/dev/peps/pep-0020/ ) as well
@@ -485,7 +499,7 @@ Automated testing for samples is managed by
485
499
including the flake8 linter, Python 2.7 , Python 3. x, and App Engine tests,
486
500
as well as automated README generation.
487
501
488
- __Note:__
502
+ __Note:__
489
503
490
504
** Library repositories:** If you are working on an existing project, a `noxfile.py` will already exist.
491
505
For new samples, create a new `noxfile.py` and paste the contents of
0 commit comments