Hello! I am using `metaflow==2.9.1` with VSCode an...
# ask-metaflow
i
Hello! I am using
metaflow==2.9.1
with VSCode and
pylint
enabled. The
from metaflow import card
statement shows the pylint error
No name 'card' in module 'metaflow'
. The flow actually runs fine. Does anybody have any help for that? All other metaflow import are fine, for example:
from metaflow import FlowSpec, IncludeFile, Parameter, step
Thanks in advance! 🙂
✅ 1
👀 1
Maybe it is what this issue refers to: https://github.com/Netflix/metaflow/issues/354? It's unfortunately pretty annoying as it then also thinks
current
has no
card
member. Example Code:
Copy code
"""Example module importing and using cards."""

from metaflow import FlowSpec, step, current
from metaflow import card
from metaflow.cards import Markdown

class CardSpec(FlowSpec):
    """Example spec."""
    @card
    @step
    def start(self):
        """ Start."""
        current.card.append(Markdown("# Test"))
        self.next(self.end)

    @step
    def end(self):
        """End."""
        print("HelloFlow is all done.")


if __name__ == "__main__":
    CardSpec()
and if I run pylint on this I get two errors:
Copy code
pylint cards_example.py 
************* Module cards_example
cards_example.py:4:0: E0611: No name 'card' in module 'metaflow' (no-name-in-module)
cards_example.py:13:8: E1101: Instance of 'Current' has no 'card' member (no-member)

------------------------------------------------------------------
Your code has been rated at 0.91/10 (previous run: 0.91/10, +0.00)