Skip to content

Commit

Permalink
feat(utils): remove import catch for stubber.
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed Mar 27, 2023
1 parent 6346222 commit 91103e6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 19 deletions.
15 changes: 4 additions & 11 deletions micropy/utils/stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@
from types import ModuleType
from typing import Optional

import micropy.data

try:
from stubber import minify
from stubber.codemod import board as stub_board
from stubber.utils import stubmaker
except ImportError:
stubmaker = None
stub_board = None
minify = None

import libcst as cst
import libcst.codemod as codemod
import micropy.data
from stubber import minify
from stubber.codemod import board as stub_board
from stubber.utils import stubmaker


def locate_create_stubs() -> Path:
Expand Down
51 changes: 44 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classifiers = [
]

[tool.poetry.scripts]
micropy = 'micropy.cli:cli'
micropy = 'micropy.app:app'

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
Expand Down Expand Up @@ -169,6 +169,7 @@ ignore = [
"E501", # line too long - let black handle.
"C901", # too complex
"C408", # rewrite as literal; makes comprehensions harder sometimes imo
"B008", # no function call as arg default; typer uses this pattern.
]
line-length = 100
target-version = 'py38'
Expand Down

0 comments on commit 91103e6

Please sign in to comment.