Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 7, 2022
1 parent fa93160 commit 29bfdda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/pyscript/_node_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
ast-based parser to gather modules/package dependencies of a Python module.
Code adapted from the find-imports project, currently in graveyard archive.
"""
from __future__ import annotations

import ast
import os
import pkgutil
from collections import defaultdict
from itertools import chain, filterfalse
from pathlib import Path
from typing import DefaultDict

from ._supported_packages import PACKAGE_RENAMES, PYODIDE_PACKAGES, STANDARD_LIBRARY

Expand Down Expand Up @@ -68,7 +69,7 @@ class FinderResult:
def __init__(self) -> None:
self._packages: set[str] = set()
self._locals: set[str] = set()
self._unsupported: DefaultDict[str, set] = defaultdict(set)
self._unsupported: defaultdict[str, set] = defaultdict(set)

def add_package(self, pkg_name: str) -> None:
self._packages.add(pkg_name)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class Dependency:
This class is a general abstraction over both external and local module dependency."""

import_line: str # Import line to inject in code under test
filename: str | None = None # filename: to be used for tmp local modules, i.e. paths
filename: str | None = (
None # filename: to be used for tmp local modules, i.e. paths
)
code: str | None = None # code in the tmp local modules
inject: str | None = None # any code to inject in code under test

Expand Down

0 comments on commit 29bfdda

Please # to comment.