Ran buildifier (#449)

diff --git a/BUILD b/BUILD
index 04bc6ef..ad7569b 100644
--- a/BUILD
+++ b/BUILD
@@ -27,8 +27,8 @@
         "LICENSE",
         "internal_deps.bzl",
         "internal_setup.bzl",
-        "//python/pip_install:distribution",
         "//python:distribution",
+        "//python/pip_install:distribution",
         "//tools:distribution",
     ],
     visibility = ["//distro:__pkg__"],
diff --git a/docs/BUILD b/docs/BUILD
index 69efa78..6c19d11 100644
--- a/docs/BUILD
+++ b/docs/BUILD
@@ -42,7 +42,7 @@
     name = "bazel_repo_tools",
     srcs = [
         "@bazel_tools//tools:bzl_srcs",
-    ]
+    ],
 )
 
 bzl_library(
diff --git a/examples/legacy_pip_import/WORKSPACE b/examples/legacy_pip_import/WORKSPACE
index 1551b0e..cd504ca 100644
--- a/examples/legacy_pip_import/WORKSPACE
+++ b/examples/legacy_pip_import/WORKSPACE
@@ -4,8 +4,8 @@
 
 http_archive(
     name = "rules_python",
-    url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
     sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
 )
 
 load("@rules_python//python/legacy_pip_import:pip.bzl", "pip_import", "pip_repositories")
diff --git a/examples/pip_install/WORKSPACE b/examples/pip_install/WORKSPACE
index e93b693..5353cea 100644
--- a/examples/pip_install/WORKSPACE
+++ b/examples/pip_install/WORKSPACE
@@ -4,8 +4,8 @@
 
 http_archive(
     name = "rules_python",
-    url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
     sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
 )
 
 load("@rules_python//python:pip.bzl", "pip_install")
diff --git a/examples/pip_parse/WORKSPACE b/examples/pip_parse/WORKSPACE
index c5e89e3..fc9256b 100644
--- a/examples/pip_parse/WORKSPACE
+++ b/examples/pip_parse/WORKSPACE
@@ -4,8 +4,8 @@
 
 http_archive(
     name = "rules_python",
-    url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
     sha256 = "778197e26c5fbeb07ac2a2c5ae405b30f6cb7ad1f5510ea6fdac03bded96cc6f",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/0.2.0/rules_python-0.2.0.tar.gz",
 )
 
 load("@rules_python//python:pip.bzl", "pip_parse")
diff --git a/examples/wheel/BUILD b/examples/wheel/BUILD
index d4f8189..a404540 100644
--- a/examples/wheel/BUILD
+++ b/examples/wheel/BUILD
@@ -70,7 +70,7 @@
 py_package(
     name = "example_pkg_with_data",
     packages = ["examples.wheel"],
-    deps = [":main_with_gen_data"]
+    deps = [":main_with_gen_data"],
 )
 
 py_wheel(
@@ -99,7 +99,10 @@
     distribution = "example_customized",
     entry_points = {
         "console_scripts": ["another = foo.bar:baz"],
-        "group2": ["second = second.main:s", "first = first.main:f"]
+        "group2": [
+            "second = second.main:s",
+            "first = first.main:f",
+        ],
     },
     homepage = "www.example.com",
     license = "Apache 2.0",
@@ -158,8 +161,8 @@
 py_wheel(
     name = "python_requires_in_a_package",
     distribution = "example_python_requires_in_a_package",
-    python_tag = "py3",
     python_requires = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
+    python_tag = "py3",
     version = "0.0.1",
     deps = [
         ":example_pkg",
@@ -172,8 +175,8 @@
     python_tag = "py3",
     version = "0.0.1",
     deps = [
-        ":example_pkg_with_data"
-    ]
+        ":example_pkg_with_data",
+    ],
 )
 
 py_wheel(
diff --git a/experimental/python/wheel.bzl b/experimental/python/wheel.bzl
index ba4868f..d3f3093 100644
--- a/experimental/python/wheel.bzl
+++ b/experimental/python/wheel.bzl
@@ -15,7 +15,7 @@
 """Obsolete. Use //python:packaging.bzl instead."""
 
 # Load and re-export py_wheel and py_package for backwards compatibility.
-load("//python:packaging.bzl", _py_wheel = "py_wheel", _py_package = "py_package")
+load("//python:packaging.bzl", _py_package = "py_package", _py_wheel = "py_wheel")
 
 py_wheel = _py_wheel
 py_package = _py_package
diff --git a/python/BUILD b/python/BUILD
index a19adb2..d4b6e3e 100644
--- a/python/BUILD
+++ b/python/BUILD
@@ -46,8 +46,8 @@
         "defs.bzl",
         "packaging.bzl",
         "pip.bzl",
-        "whl.bzl",
         "private/reexports.bzl",
+        "whl.bzl",
     ],
     visibility = ["//:__pkg__"],
 )
diff --git a/python/legacy_pip_import/pip.bzl b/python/legacy_pip_import/pip.bzl
index bc493b8..e2b1b87 100644
--- a/python/legacy_pip_import/pip.bzl
+++ b/python/legacy_pip_import/pip.bzl
@@ -48,7 +48,7 @@
         ]
 
     # To see the output, pass: quiet=False
-    result = repository_ctx.execute(args, timeout=repository_ctx.attr.timeout)
+    result = repository_ctx.execute(args, timeout = repository_ctx.attr.timeout)
 
     if result.return_code:
         fail("pip_import failed: %s (%s)" % (result.stdout, result.stderr))
@@ -75,7 +75,7 @@
         ),
         "timeout": attr.int(
             default = 600,
-            doc = "Timeout (in seconds) for repository fetch."
+            doc = "Timeout (in seconds) for repository fetch.",
         ),
         "_script": attr.label(
             executable = True,
diff --git a/python/pip.bzl b/python/pip.bzl
index 32a8901..5027666 100644
--- a/python/pip.bzl
+++ b/python/pip.bzl
@@ -47,6 +47,7 @@
       name: A unique name for the created external repository (default 'pip').
       **kwargs: Keyword arguments passed directly to the `pip_repository` repository rule.
     """
+
     # Just in case our dependencies weren't already fetched
     pip_install_dependencies()
 
diff --git a/python/pip_install/BUILD b/python/pip_install/BUILD
index 63ff584..22f48f7 100644
--- a/python/pip_install/BUILD
+++ b/python/pip_install/BUILD
@@ -18,6 +18,9 @@
 )
 
 exports_files(
-    ["pip_repository.bzl", "repositories.bzl"],
+    [
+        "pip_repository.bzl",
+        "repositories.bzl",
+    ],
     visibility = ["//docs:__pkg__"],
 )
diff --git a/python/pip_install/extract_wheels/lib/BUILD b/python/pip_install/extract_wheels/lib/BUILD
index c23d8f3..82c7173 100644
--- a/python/pip_install/extract_wheels/lib/BUILD
+++ b/python/pip_install/extract_wheels/lib/BUILD
@@ -4,12 +4,12 @@
 py_library(
     name = "lib",
     srcs = [
+        "arguments.py",
         "bazel.py",
         "namespace_pkgs.py",
         "purelib.py",
         "requirements.py",
         "wheel.py",
-        "arguments.py",
     ],
     visibility = [
         "//python/pip_install/extract_wheels:__subpackages__",
@@ -64,11 +64,11 @@
     srcs = [
         "whl_filegroup_test.py",
     ],
+    data = ["//examples/wheel:minimal_with_py_package"],
     tags = ["unit"],
     deps = [
         ":lib",
     ],
-    data = ["//examples/wheel:minimal_with_py_package"]
 )
 
 py_test(
diff --git a/python/pip_install/parse_requirements_to_bzl/BUILD b/python/pip_install/parse_requirements_to_bzl/BUILD
index 61bde47..bb60323 100644
--- a/python/pip_install/parse_requirements_to_bzl/BUILD
+++ b/python/pip_install/parse_requirements_to_bzl/BUILD
@@ -14,8 +14,8 @@
 py_library(
     name = "lib",
     srcs = ["__init__.py"],
-    deps = [requirement("pip")],
     visibility = ["//python/pip_install/extract_wheels:__subpackages__"],
+    deps = [requirement("pip")],
 )
 
 py_test(
@@ -27,13 +27,16 @@
     tags = ["unit"],
     deps = [
         ":lib",
-        "//python/pip_install/extract_wheels/lib"
+        "//python/pip_install/extract_wheels/lib",
     ],
 )
 
 filegroup(
     name = "distribution",
-    srcs = glob(["*"], exclude = ["*_test.py"]) + [
+    srcs = glob(
+        ["*"],
+        exclude = ["*_test.py"],
+    ) + [
         "//python/pip_install/parse_requirements_to_bzl/extract_single_wheel:distribution",
     ],
     visibility = ["//python/pip_install:__subpackages__"],
diff --git a/python/pip_install/pip_repository.bzl b/python/pip_install/pip_repository.bzl
index c07c9cd..52d6ad5 100644
--- a/python/pip_install/pip_repository.bzl
+++ b/python/pip_install/pip_repository.bzl
@@ -211,7 +211,7 @@
 
 def _impl_whl_library(rctx):
     # pointer to parent repo so these rules rerun if the definitions in requirements.bzl change.
-    _parent_repo_label = Label("@{parent}//:requirements.bzl".format(parent=rctx.attr.repo))
+    _parent_repo_label = Label("@{parent}//:requirements.bzl".format(parent = rctx.attr.repo))
     pypath = _construct_pypath(rctx)
     args = [
         rctx.attr.python_interpreter,
diff --git a/python/pip_install/repositories.bzl b/python/pip_install/repositories.bzl
index db9cd27..57d15f3 100644
--- a/python/pip_install/repositories.bzl
+++ b/python/pip_install/repositories.bzl
@@ -50,7 +50,7 @@
 def pip_install_dependencies():
     """
     Fetch dependencies these rules depend on. Workspaces that use the pip_install rule can call this.
-    
+
     (However we call it from pip_install, making it optional for users to do so.)
     """
     for (name, url, sha256) in _RULE_DEPS: