Skip to content

Commit 29bfdda

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fa93160 commit 29bfdda

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/pyscript/_node_parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
ast-based parser to gather modules/package dependencies of a Python module.
33
Code adapted from the find-imports project, currently in graveyard archive.
44
"""
5+
from __future__ import annotations
6+
57
import ast
68
import os
79
import pkgutil
810
from collections import defaultdict
911
from itertools import chain, filterfalse
1012
from pathlib import Path
11-
from typing import DefaultDict
1213

1314
from ._supported_packages import PACKAGE_RENAMES, PYODIDE_PACKAGES, STANDARD_LIBRARY
1415

@@ -68,7 +69,7 @@ class FinderResult:
6869
def __init__(self) -> None:
6970
self._packages: set[str] = set()
7071
self._locals: set[str] = set()
71-
self._unsupported: DefaultDict[str, set] = defaultdict(set)
72+
self._unsupported: defaultdict[str, set] = defaultdict(set)
7273

7374
def add_package(self, pkg_name: str) -> None:
7475
self._packages.add(pkg_name)

tests/test_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class Dependency:
2525
This class is a general abstraction over both external and local module dependency."""
2626

2727
import_line: str # Import line to inject in code under test
28-
filename: str | None = None # filename: to be used for tmp local modules, i.e. paths
28+
filename: str | None = (
29+
None # filename: to be used for tmp local modules, i.e. paths
30+
)
2931
code: str | None = None # code in the tmp local modules
3032
inject: str | None = None # any code to inject in code under test
3133

0 commit comments

Comments
 (0)