Skip to content

Commit

Permalink
Use callable instead of inspect.isfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
moradology committed Feb 9, 2024
1 parent 9601ec4 commit 1645ce9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pangeo_forge_runner/commands/bake.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Command to run a pangeo-forge recipe
"""
import hashlib
import inspect
import os
import re
import string
Expand Down Expand Up @@ -284,7 +283,7 @@ def start(self):
# Chain our recipe to the pipeline. This mutates the `pipeline` object!
# We expect `recipe` to either be a beam PTransform, or an object with a 'to_beam'
# method that returns a transform.
if inspect.isfunction(recipe):
if callable(recipe):
recipe(pipeline)

Check warning on line 287 in pangeo_forge_runner/commands/bake.py

View check run for this annotation

Codecov / codecov/patch

pangeo_forge_runner/commands/bake.py#L287

Added line #L287 was not covered by tests
elif isinstance(recipe, PTransform):
# This means we are in pangeo-forge-recipes >=0.9
Expand Down

0 comments on commit 1645ce9

Please sign in to comment.