Add `.style.yapf` and `.pylintrc` configurations.
Added `.style.yapf` to define how to format TFF with `yapf`.
Added `.pylintrc` to define how to lint TFF with `pylint`.
Added instructions to `CONTRIBUTING.md` to help contributors know how to format and lint their contributions.
@@ -41,15 +41,36 @@ information on using pull requests.
* Python code should adhere to the
[Google Python Style Guide](http://google.github.io/styleguide/pyguide.html).
-* Python code must support Python2 and Python3 usage.
+* Fromat your changes.
+
+ * Install [yapf](https://pypi.org/project/yapf/).
+
+ * Format unstaged changes, to Python files, in place.
+
+ ```shell
+ git diff --name-only \
+ | sed '/.*\.py/!d' \
+ | xargs yapf --in-place
+ ```
+
+* Lint your changes.
+
+ * Install [pylint](https://pypi.org/project/pylint/).
+
+ * Lint unstaged changes to Python files.
+
+ ```shell
+ git diff --name-only \
+ | sed '/.*\.py/!d' \
+ | xargs pylint
+ ```
+
+* Python code must support Python 3 usage.
* Include a license at the top of new files.
* [Python license example](https://github.com/tensorflow/federated/blob/master/tensorflow_federated/python/__init__.py#L1)
-* Generally, function names should be verbs, e.g. `to_var_dict` rather than
- `var_dict`.
-
### TensorFlow-specific Guidelines.
* TensorFlow code should follow the
