Skip to content

Commit fab5d9a

Browse files
authored
Make imports more clear (#174)
* Make imports more clear * May as well make the code lint
1 parent adc64f0 commit fab5d9a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎book/plugins/how-to-guides/create-register-pipeline.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Second, `Pipelines` must have `ctx` as their first parameter, which provides the
1818
Let's take a look at [`q2_diversity.core_metrics`](https://github.com/qiime2/q2-diversity/blob/3fe491062b8a72939111ff66b2f4aeab8c12b16d/q2_diversity/_core_metrics.py#L14) for an example of a function that we can register as a `Pipeline`:
1919

2020
```python
21+
from qiime2.plugin import IContext
22+
23+
2124
def core_metrics(ctx: IContext,
2225
table: Artifact,
2326
sampling_depth: int,

‎book/plugins/how-to-guides/track-the-value-of-auto-params-in-provenance.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ my_plugin.methods.register_function(
3434
What changes is the implementation of the underlying Python function:
3535

3636
```python
37-
from qiime2.plugin.type import CaptureHolder
37+
from qiime2.plugin import CaptureHolder
38+
3839

3940
def random_seed_method(random_seed: CaptureHolder[int] = None) -> int:
4041
# Resolve the seed: if the user passed None, generate a random value and

0 commit comments

Comments
 (0)