Skip to content

Commit 8fe5916

Browse files
authored
Merge pull request #955 from paugier/bump-black-target-version-py36
Bump Black version to 20.8b1 and use --target-version=py36
2 parents f0c6f65 + fadb3c8 commit 8fe5916

File tree

9 files changed

+18
-26
lines changed

9 files changed

+18
-26
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: 19.10b0
3+
rev: 20.8b1
44
hooks:
55
- id: black
6-
args: [--target-version=py35]
6+
args: [--target-version=py36]

repo2docker/buildpacks/conda/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ def get_preassemble_script_files(self):
266266
return assemble_files
267267

268268
def get_env_scripts(self):
269-
"""Return series of build-steps specific to this source repository.
270-
"""
269+
"""Return series of build-steps specific to this source repository."""
271270
scripts = []
272271
environment_yml = self.binder_path("environment.yml")
273272
env_prefix = "${KERNEL_PYTHON_PREFIX}" if self.py2 else "${NB_PYTHON_PREFIX}"
@@ -340,6 +339,5 @@ def get_assemble_scripts(self):
340339
return scripts
341340

342341
def detect(self):
343-
"""Check if current repo should be built with the Conda BuildPack.
344-
"""
342+
"""Check if current repo should be built with the Conda BuildPack."""
345343
return os.path.exists(self.binder_path("environment.yml")) and super().detect()

repo2docker/buildpacks/julia/julia_project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ def get_env(self):
8686
def get_path(self):
8787
"""Adds path to Julia binaries to user's PATH.
8888
89-
Returns:
90-
an ordered list of path strings. The path to the Julia
91-
executable is added to the list.
89+
Returns:
90+
an ordered list of path strings. The path to the Julia
91+
executable is added to the list.
9292
9393
"""
9494
return super().get_path() + ["${JULIA_PATH}/bin"]

repo2docker/buildpacks/julia/julia_require.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ def get_build_env(self):
8888
def get_path(self):
8989
"""Adds path to Julia binaries to user's PATH.
9090
91-
Returns:
92-
an ordered list of path strings. The path to the Julia
93-
executable is added to the list.
91+
Returns:
92+
an ordered list of path strings. The path to the Julia
93+
executable is added to the list.
9494
9595
"""
9696
return super().get_path() + ["${JULIA_HOME}"]

repo2docker/buildpacks/nix/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ class NixBuildPack(BaseImage):
88
"""A nix Package Manager BuildPack"""
99

1010
def get_path(self):
11-
"""Return paths to be added to PATH environemnt variable
12-
"""
11+
"""Return paths to be added to PATH environemnt variable"""
1312
return super().get_path() + ["/home/${NB_USER}/.nix-profile/bin"]
1413

1514
def get_env(self):
@@ -47,16 +46,14 @@ def get_build_scripts(self):
4746
]
4847

4948
def get_build_script_files(self):
50-
"""Dict of files to be copied to the container image for use in building
51-
"""
49+
"""Dict of files to be copied to the container image for use in building"""
5250
return {
5351
"nix/install-nix.bash": "/home/${NB_USER}/.local/bin/install-nix.bash",
5452
"nix/nix-shell-wrapper": "/usr/local/bin/nix-shell-wrapper",
5553
}
5654

5755
def get_assemble_scripts(self):
58-
"""Return series of build-steps specific to this source repository.
59-
"""
56+
"""Return series of build-steps specific to this source repository."""
6057
return super().get_assemble_scripts() + [
6158
(
6259
"${NB_USER}",

repo2docker/buildpacks/pipfile/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ def get_preassemble_scripts(self):
9393
return scripts
9494

9595
def get_assemble_scripts(self):
96-
"""Return series of build-steps specific to this repository.
97-
"""
96+
"""Return series of build-steps specific to this repository."""
9897
# If we have either Pipfile.lock, Pipfile, or runtime.txt declare the
9998
# use of Python 2, Python 2.7 will be made available in the *kernel*
10099
# environment. The notebook servers environment on the other hand
@@ -168,8 +167,7 @@ def get_assemble_scripts(self):
168167
return assemble_scripts
169168

170169
def detect(self):
171-
"""Check if current repo should be built with the Pipfile buildpack.
172-
"""
170+
"""Check if current repo should be built with the Pipfile buildpack."""
173171
# first make sure python is not explicitly unwanted
174172
runtime_txt = self.binder_path("runtime.txt")
175173
if os.path.exists(runtime_txt):

repo2docker/buildpacks/python/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ def get_assemble_scripts(self):
132132
return assemble_scripts
133133

134134
def detect(self):
135-
"""Check if current repo should be built with the Python buildpack.
136-
"""
135+
"""Check if current repo should be built with the Python buildpack."""
137136
requirements_txt = self.binder_path("requirements.txt")
138137
runtime_txt = self.binder_path("runtime.txt")
139138
setup_py = "setup.py"

repo2docker/contentproviders/dataverse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class Dataverse(DoiProvider):
1313
"""
1414
Provide contents of a Dataverse dataset.
15-
15+
1616
This class loads a a list of existing Dataverse installations from the internal
1717
file dataverse.json. This file is manually updated with the following command:
1818

repo2docker/contentproviders/figshare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class Figshare(DoiProvider):
1717
"""Provide contents of a Figshare article.
18-
18+
1919
See https://docs.figshare.com/#public_article for API docs.
2020
2121
Examples:

0 commit comments

Comments
 (0)