Skip to content

Commit

Permalink
doc: Update code style guide for Python 3 and docstrings (RobotLocomo…
Browse files Browse the repository at this point in the history
…tion#12236)

workspace: Bump styleguide fork to latest
  • Loading branch information
EricCousineau-TRI authored Aug 4, 2020
1 parent 3f2fa9c commit d381536
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion doc/code_style_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@ incorporates `PEP 257 -- Docstring Conventions
<https://www.python.org/dev/peps/pep-0257/>`_, Drake follows its
recommendations as well.

Drake also follows the
`RobotLocomotion fork <https://drake.mit.edu/styleguide/pyguide.html>`_
of the Google Python Style Guide. Please refer to that page for the sections
that are adhered to, and the relevant exceptions.

See :ref:`tools for complying with coding style <code-style-tools>` for details
about the automated style checks.

.. TODO(eric.cousineau): Move these clarifications and exceptions to styleguide
repo.
.. _code-style-guide-python-clarifications:

Clarifications
Expand Down Expand Up @@ -88,7 +96,7 @@ Additional Rules

Rationale: ``/usr/bin/env`` enables a ``PATH`` search for the Python 3
executable. This is also recommended by
`PEP 394 <https://www.python.org/dev/peps/pep-0394/>`_`.
`PEP 394 <https://www.python.org/dev/peps/pep-0394/>`_.

.. [#bazel_py_script] Generally, this means scripts that run via ``bazel run``,
``bazel test``, or ``./bazel-bin/...``.
Expand Down
4 changes: 2 additions & 2 deletions tools/workspace/styleguide/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def styleguide_repository(
github_archive(
name = name,
repository = "RobotLocomotion/styleguide",
commit = "97ac1c4e58c06f9c774ed02321cf716a21e0342d",
sha256 = "7d8adeac7b659ec082f8e1147301be431980f4c3116d3e6b1def691fccbbf47e", # noqa
commit = "47a6f403e7a6ed5e44e7875bcec4d27815063029",
sha256 = "68344607a14230ede11b4dcf886ed9bef6df2c339f32ec724591a94e5d5f2e6b", # noqa
build_file = "@drake//tools/workspace/styleguide:package.BUILD.bazel",
mirrors = mirrors,
)

0 comments on commit d381536

Please sign in to comment.