Bump Black version (20.8b1) and use --target-version=py36
MODIFY
.pre-commit-config.yaml
.pre-commit-config.yaml
repos:
- repo: https://github.com/ambv/black
- rev: 19.10b0
+ rev: 20.8b1
hooks:
- id: black
- args: [--target-version=py35]
+ args: [--target-version=py36]

MODIFY
repo2docker/buildpacks/conda/__init__.py
repo2docker/buildpacks/conda/__init__.py
@@ -266,8 +266,7 @@ class CondaBuildPack(BaseImage):
return assemble_files
def get_env_scripts(self):
- """Return series of build-steps specific to this source repository.
- """
+ """Return series of build-steps specific to this source repository."""
scripts = []
environment_yml = self.binder_path("environment.yml")
env_prefix = "${KERNEL_PYTHON_PREFIX}" if self.py2 else "${NB_PYTHON_PREFIX}"
@@ -340,6 +339,5 @@ class CondaBuildPack(BaseImage):
return scripts
def detect(self):
- """Check if current repo should be built with the Conda BuildPack.
- """
+ """Check if current repo should be built with the Conda BuildPack."""
return os.path.exists(self.binder_path("environment.yml")) and super().detect()

MODIFY
repo2docker/buildpacks/nix/__init__.py
repo2docker/buildpacks/nix/__init__.py
@@ -8,8 +8,7 @@ class NixBuildPack(BaseImage):
"""A nix Package Manager BuildPack"""
def get_path(self):
- """Return paths to be added to PATH environemnt variable
- """
+ """Return paths to be added to PATH environemnt variable"""
return super().get_path() + ["/home/${NB_USER}/.nix-profile/bin"]
def get_env(self):
@@ -47,16 +46,14 @@ class NixBuildPack(BaseImage):
]
def get_build_script_files(self):
- """Dict of files to be copied to the container image for use in building
- """
+ """Dict of files to be copied to the container image for use in building"""
return {
"nix/install-nix.bash": "/home/${NB_USER}/.local/bin/install-nix.bash",
"nix/nix-shell-wrapper": "/usr/local/bin/nix-shell-wrapper",
}
def get_assemble_scripts(self):
- """Return series of build-steps specific to this source repository.
- """
+ """Return series of build-steps specific to this source repository."""
return super().get_assemble_scripts() + [
(
"${NB_USER}",

MODIFY
repo2docker/buildpacks/pipfile/__init__.py
repo2docker/buildpacks/pipfile/__init__.py
@@ -93,8 +93,7 @@ class PipfileBuildPack(CondaBuildPack):
return scripts
def get_assemble_scripts(self):
- """Return series of build-steps specific to this repository.
- """
+ """Return series of build-steps specific to this repository."""
# If we have either Pipfile.lock, Pipfile, or runtime.txt declare the
# use of Python 2, Python 2.7 will be made available in the *kernel*
# environment. The notebook servers environment on the other hand
@@ -168,8 +167,7 @@ class PipfileBuildPack(CondaBuildPack):
return assemble_scripts
def detect(self):
- """Check if current repo should be built with the Pipfile buildpack.
- """
+ """Check if current repo should be built with the Pipfile buildpack."""
# first make sure python is not explicitly unwanted
runtime_txt = self.binder_path("runtime.txt")
if os.path.exists(runtime_txt):

MODIFY
repo2docker/buildpacks/python/__init__.py
repo2docker/buildpacks/python/__init__.py
@@ -132,8 +132,7 @@ class PythonBuildPack(CondaBuildPack):
return assemble_scripts
def detect(self):
- """Check if current repo should be built with the Python buildpack.
- """
+ """Check if current repo should be built with the Python buildpack."""
requirements_txt = self.binder_path("requirements.txt")
runtime_txt = self.binder_path("runtime.txt")
setup_py = "setup.py"

Bump Black version (20.8b1) and use --target-version=py36