Skip to content

Commit

Permalink
Merge pull request #165 from pangeo-forge/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
moradology authored Feb 13, 2024
2 parents 8e8e4be + 3641609 commit 3360d5d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:

# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand Down
1 change: 1 addition & 0 deletions pangeo_forge_runner/bakery/dataflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Bakery for baking pangeo-forge recipes in GCP DataFlow
"""

import shutil
import subprocess

Expand Down
1 change: 1 addition & 0 deletions pangeo_forge_runner/bakery/flink.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Bakery for baking pangeo-forge recipes in GCP DataFlow
"""

import copy
import hashlib
import json
Expand Down
1 change: 1 addition & 0 deletions pangeo_forge_runner/bakery/local.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Bakery for baking pangeo-forge recipes in Direct Runner
"""

from apache_beam.pipeline import PipelineOptions
from traitlets import Integer

Expand Down
6 changes: 4 additions & 2 deletions pangeo_forge_runner/commands/bake.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command to run a pangeo-forge recipe
"""

import hashlib
import os
import re
Expand Down Expand Up @@ -223,8 +224,9 @@ def start(self):
)

self.log.info("Parsing recipes...", extra={"status": "running"})
with redirect_stderr(self.log, {"status": "running"}), redirect_stdout(
self.log, {"status": "running"}
with (
redirect_stderr(self.log, {"status": "running"}),
redirect_stdout(self.log, {"status": "running"}),
):
recipes = feedstock.parse_recipes()

Expand Down
5 changes: 3 additions & 2 deletions pangeo_forge_runner/commands/expand_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ class ExpandMeta(BaseCommand):
def start(self):
with self.fetch() as checkout_dir:
feedstock = Feedstock(Path(checkout_dir) / self.feedstock_subdir)
with redirect_stderr(self.log, {"status": "running"}), redirect_stdout(
self.log, {"status": "running"}
with (
redirect_stderr(self.log, {"status": "running"}),
redirect_stdout(self.log, {"status": "running"}),
):
expanded = feedstock.get_expanded_meta()
if self.json_logs:
Expand Down
1 change: 1 addition & 0 deletions pangeo_forge_runner/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
This is what is actually injected into the recipes in the end.
"""

# Use the backported importlib_metadata as we still support Python 3.9
# Once we're on 3.10 we can remove this dependency and use the built in
# importlib.metadata
Expand Down
1 change: 1 addition & 0 deletions pangeo_forge_runner/recipe_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
to handle `ImportFrom` statements.
- `import pangeo_forge_recipes; pangeo_forge_recipes.transforms.StoreToZarr` is not handled either
"""

from ast import (
Attribute,
Call,
Expand Down

0 comments on commit 3360d5d

Please sign in to comment.