From d90db35a8420fa7582cd55d77119aa3e112578e2 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 31 Jul 2023 15:03:54 -0500 Subject: [PATCH] fix: ignore commented lines in `viv run` --- src/viv/viv.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index a6e4594..3c9d3f8 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -52,7 +52,7 @@ from typing import ( from urllib.error import HTTPError from urllib.request import urlopen -__version__ = "23.5a6" +__version__ = "23.5a6-dev" class Spinner: @@ -1023,7 +1023,8 @@ def uses_viv(txt: str) -> bool: return bool( re.search( """ - \s*__import__\(\s*["']viv["']\s*\).use\(.* + ^(?!\#)\s* + __import__\(\s*["']viv["']\s*\).use\(.* | from\ viv\ import\ use |