Skip to content

Commit ac485fa

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c1ddf46 commit ac485fa

File tree

8 files changed

+57
-57
lines changed

8 files changed

+57
-57
lines changed

repo2docker/buildpacks/base.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def __init__(self, base_image):
236236
)
237237
self.platform = ""
238238

239-
@lru_cache()
239+
@lru_cache
240240
def get_packages(self):
241241
"""
242242
List of packages that are installed in this BuildPack.
@@ -246,7 +246,7 @@ def get_packages(self):
246246
"""
247247
return set()
248248

249-
@lru_cache()
249+
@lru_cache
250250
def get_base_packages(self):
251251
"""
252252
Base set of apt packages that are installed for all images.
@@ -265,7 +265,7 @@ def get_base_packages(self):
265265
"gettext-base",
266266
}
267267

268-
@lru_cache()
268+
@lru_cache
269269
def get_build_env(self):
270270
"""
271271
Ordered list of environment variables to be set for this image.
@@ -281,7 +281,7 @@ def get_build_env(self):
281281
"""
282282
return []
283283

284-
@lru_cache()
284+
@lru_cache
285285
def get_env(self):
286286
"""
287287
Ordered list of environment variables to be set for this image.
@@ -296,7 +296,7 @@ def get_env(self):
296296
"""
297297
return []
298298

299-
@lru_cache()
299+
@lru_cache
300300
def get_path(self):
301301
"""
302302
Ordered list of file system paths to look for executables in.
@@ -306,14 +306,14 @@ def get_path(self):
306306
"""
307307
return []
308308

309-
@lru_cache()
309+
@lru_cache
310310
def get_labels(self):
311311
"""
312312
Docker labels to set on the built image.
313313
"""
314314
return self.labels
315315

316-
@lru_cache()
316+
@lru_cache
317317
def get_build_script_files(self):
318318
"""
319319
Dict of files to be copied to the container image for use in building.
@@ -338,7 +338,7 @@ def _check_stencila(self):
338338
f"Found a stencila manifest.xml at {root}. Stencila is no longer supported."
339339
)
340340

341-
@lru_cache()
341+
@lru_cache
342342
def get_build_scripts(self):
343343
"""
344344
Ordered list of shell script snippets to build the base image.
@@ -360,7 +360,7 @@ def get_build_scripts(self):
360360

361361
return []
362362

363-
@lru_cache()
363+
@lru_cache
364364
def get_preassemble_script_files(self):
365365
"""
366366
Dict of files to be copied to the container image for use in preassembly.
@@ -374,7 +374,7 @@ def get_preassemble_script_files(self):
374374
"""
375375
return {}
376376

377-
@lru_cache()
377+
@lru_cache
378378
def get_preassemble_scripts(self):
379379
"""
380380
Ordered list of shell snippets to build an image for this repository.
@@ -391,7 +391,7 @@ def get_preassemble_scripts(self):
391391
"""
392392
return []
393393

394-
@lru_cache()
394+
@lru_cache
395395
def get_assemble_scripts(self):
396396
"""
397397
Ordered list of shell script snippets to build the repo into the image.
@@ -418,7 +418,7 @@ def get_assemble_scripts(self):
418418
"""
419419
return []
420420

421-
@lru_cache()
421+
@lru_cache
422422
def get_post_build_scripts(self):
423423
"""
424424
An ordered list of executable scripts to execute after build.
@@ -431,7 +431,7 @@ def get_post_build_scripts(self):
431431
"""
432432
return []
433433

434-
@lru_cache()
434+
@lru_cache
435435
def get_start_script(self):
436436
"""
437437
The path to a script to be executed at container start up.
@@ -672,22 +672,22 @@ def _filter_tar(tarinfo):
672672

673673

674674
class BaseImage(BuildPack):
675-
@lru_cache()
675+
@lru_cache
676676
def get_build_env(self):
677677
"""Return env directives required for build"""
678678
return [
679679
("APP_BASE", "/srv"),
680680
]
681681

682-
@lru_cache()
682+
@lru_cache
683683
def get_env(self):
684684
"""Return env directives to be set after build"""
685685
return []
686686

687687
def detect(self):
688688
return True
689689

690-
@lru_cache()
690+
@lru_cache
691691
def get_preassemble_scripts(self):
692692
scripts = []
693693
try:
@@ -727,19 +727,19 @@ def get_preassemble_scripts(self):
727727

728728
return scripts
729729

730-
@lru_cache()
730+
@lru_cache
731731
def get_assemble_scripts(self):
732732
"""Return directives to run after the entire repository has been added to the image"""
733733
return []
734734

735-
@lru_cache()
735+
@lru_cache
736736
def get_post_build_scripts(self):
737737
post_build = self.binder_path("postBuild")
738738
if os.path.exists(post_build):
739739
return [post_build]
740740
return []
741741

742-
@lru_cache()
742+
@lru_cache
743743
def get_start_script(self):
744744
start = self.binder_path("start")
745745
if os.path.exists(start):

repo2docker/buildpacks/conda/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _conda_platform(self):
4646
return "linux-aarch64"
4747
raise ValueError(f"Unknown platform {self.platform}")
4848

49-
@lru_cache()
49+
@lru_cache
5050
def get_build_env(self):
5151
"""Return environment variables to be set.
5252
@@ -90,13 +90,13 @@ def get_build_env(self):
9090
env.append(("KERNEL_PYTHON_PREFIX", "${NB_PYTHON_PREFIX}"))
9191
return env
9292

93-
@lru_cache()
93+
@lru_cache
9494
def get_env(self):
9595
"""Make kernel env the default for `conda install`"""
9696
env = super().get_env() + [("CONDA_DEFAULT_ENV", "${KERNEL_PYTHON_PREFIX}")]
9797
return env
9898

99-
@lru_cache()
99+
@lru_cache
100100
def get_path(self):
101101
"""Return paths (including conda environment path) to be added to
102102
the PATH environment variable.
@@ -111,7 +111,7 @@ def get_path(self):
111111
path.append("${NPM_DIR}/bin")
112112
return path
113113

114-
@lru_cache()
114+
@lru_cache
115115
def get_build_scripts(self):
116116
"""
117117
Return series of build-steps common to all Python 3 repositories.
@@ -149,7 +149,7 @@ def get_build_scripts(self):
149149

150150
major_pythons = {"2": "2.7", "3": "3.10"}
151151

152-
@lru_cache()
152+
@lru_cache
153153
def get_build_script_files(self):
154154
"""
155155
Dict of files to be copied to the container image for use in building.
@@ -374,7 +374,7 @@ def separate_kernel_env(self):
374374
self.kernel_env_cutoff_version
375375
)
376376

377-
@lru_cache()
377+
@lru_cache
378378
def get_preassemble_script_files(self):
379379
"""preassembly only requires environment.yml
380380
@@ -388,7 +388,7 @@ def get_preassemble_script_files(self):
388388
assemble_files[environment_yml] = environment_yml
389389
return assemble_files
390390

391-
@lru_cache()
391+
@lru_cache
392392
def get_env_scripts(self):
393393
"""Return series of build-steps specific to this source repository."""
394394
scripts = []
@@ -455,14 +455,14 @@ def get_env_scripts(self):
455455
]
456456
return scripts
457457

458-
@lru_cache()
458+
@lru_cache
459459
def get_preassemble_scripts(self):
460460
scripts = super().get_preassemble_scripts()
461461
if self._should_preassemble_env:
462462
scripts.extend(self.get_env_scripts())
463463
return scripts
464464

465-
@lru_cache()
465+
@lru_cache
466466
def get_assemble_scripts(self):
467467
scripts = super().get_assemble_scripts()
468468
if not self._should_preassemble_env:

repo2docker/buildpacks/julia/julia_project.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def julia_version(self):
6969
raise RuntimeError("Failed to find a matching Julia version: {compat}")
7070
return match
7171

72-
@lru_cache()
72+
@lru_cache
7373
def get_build_env(self):
7474
"""Get additional environment settings for Julia and Jupyter
7575
@@ -112,11 +112,11 @@ def project_dir(self):
112112
else:
113113
return "${REPO_DIR}"
114114

115-
@lru_cache()
115+
@lru_cache
116116
def get_env(self):
117117
return super().get_env() + [("JULIA_PROJECT", self.project_dir)]
118118

119-
@lru_cache()
119+
@lru_cache
120120
def get_path(self):
121121
"""Adds path to Julia binaries to user's PATH.
122122
@@ -127,7 +127,7 @@ def get_path(self):
127127
"""
128128
return super().get_path() + ["${JULIA_PATH}/bin"]
129129

130-
@lru_cache()
130+
@lru_cache
131131
def get_build_scripts(self):
132132
"""
133133
Return series of build-steps common to "ALL" Julia repositories
@@ -156,7 +156,7 @@ def get_build_scripts(self):
156156
),
157157
]
158158

159-
@lru_cache()
159+
@lru_cache
160160
def get_assemble_scripts(self):
161161
"""
162162
Return series of build-steps specific to "this" Julia repository

repo2docker/buildpacks/nix/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
class NixBuildPack(BaseImage):
1010
"""A nix Package Manager BuildPack"""
1111

12-
@lru_cache()
12+
@lru_cache
1313
def get_path(self):
1414
"""Return paths to be added to PATH environemnt variable"""
1515
return super().get_path() + ["/home/${NB_USER}/.nix-profile/bin"]
1616

17-
@lru_cache()
17+
@lru_cache
1818
def get_env(self):
1919
"""Ordered list of environment variables to be set for this image"""
2020

@@ -24,7 +24,7 @@ def get_env(self):
2424
("GIT_SSL_CAINFO", "/etc/ssl/certs/ca-certificates.crt"),
2525
]
2626

27-
@lru_cache()
27+
@lru_cache
2828
def get_build_scripts(self):
2929
"""
3030
Return series of build-steps common to all nix repositories.
@@ -60,15 +60,15 @@ def get_build_scripts(self):
6060
),
6161
]
6262

63-
@lru_cache()
63+
@lru_cache
6464
def get_build_script_files(self):
6565
"""Dict of files to be copied to the container image for use in building"""
6666
return {
6767
"nix/install-nix.bash": "/home/${NB_USER}/.local/bin/install-nix.bash",
6868
"nix/nix-shell-wrapper": "/usr/local/bin/nix-shell-wrapper",
6969
}
7070

71-
@lru_cache()
71+
@lru_cache
7272
def get_assemble_scripts(self):
7373
"""Return series of build-steps specific to this source repository."""
7474
return super().get_assemble_scripts() + [
@@ -82,7 +82,7 @@ def get_assemble_scripts(self):
8282
)
8383
]
8484

85-
@lru_cache()
85+
@lru_cache
8686
def get_start_script(self):
8787
"""The path to a script to be executed as ENTRYPOINT"""
8888
# the shell wrapper script duplicates the behaviour of other buildpacks

repo2docker/buildpacks/pipfile/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def python_version(self):
8080
)
8181
return self._python_version
8282

83-
@lru_cache()
83+
@lru_cache
8484
def get_preassemble_script_files(self):
8585
"""Return files needed for preassembly"""
8686
files = super().get_preassemble_script_files()
@@ -90,7 +90,7 @@ def get_preassemble_script_files(self):
9090
files[path] = path
9191
return files
9292

93-
@lru_cache()
93+
@lru_cache
9494
def get_preassemble_scripts(self):
9595
"""scripts to run prior to staging the repo contents"""
9696
scripts = super().get_preassemble_scripts()
@@ -108,7 +108,7 @@ def get_preassemble_scripts(self):
108108
)
109109
return scripts
110110

111-
@lru_cache()
111+
@lru_cache
112112
def get_assemble_scripts(self):
113113
"""Return series of build-steps specific to this repository."""
114114
# If we have either Pipfile.lock, Pipfile, or runtime.txt declare the

repo2docker/buildpacks/python/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _should_preassemble_pip(self):
9898
# allow assembly from subset
9999
return True
100100

101-
@lru_cache()
101+
@lru_cache
102102
def get_preassemble_script_files(self):
103103
assemble_files = super().get_preassemble_script_files()
104104
for name in ("requirements.txt", "requirements3.txt"):
@@ -107,15 +107,15 @@ def get_preassemble_script_files(self):
107107
assemble_files[requirements_txt] = requirements_txt
108108
return assemble_files
109109

110-
@lru_cache()
110+
@lru_cache
111111
def get_preassemble_scripts(self):
112112
"""Return scripts to run before adding the full repository"""
113113
scripts = super().get_preassemble_scripts()
114114
if self._should_preassemble_pip:
115115
scripts.extend(self._get_pip_scripts())
116116
return scripts
117117

118-
@lru_cache()
118+
@lru_cache
119119
def get_assemble_scripts(self):
120120
"""Return series of build steps that require the full repository"""
121121
# If we have a runtime.txt & that's set to python-2.7,

0 commit comments

Comments
 (0)