Skip to content

Commit

Permalink
Fix lint and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-koch committed Jan 12, 2024
1 parent a418a7e commit 458c721
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions guppy/checker/expr_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,7 @@ def visit_PyExpr(self, node: PyExpr) -> tuple[ast.expr, GuppyType]:
# CPython (see `get_py_scope()`).
if sys.implementation.name != "cpython":
raise GuppyError(
"Compile-time `py(...)` expressions are only supported in CPython",
node
"Compile-time `py(...)` expressions are only supported in CPython", node
)

try:
Expand Down
2 changes: 0 additions & 2 deletions guppy/decorator.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import functools
import inspect
from collections.abc import Callable, Iterator, Sequence
from dataclasses import dataclass
from typing import Any, ClassVar, TypeVar

from guppy.ast_util import AstNode, has_empty_body
from guppy.checker.core import PyScope
from guppy.custom import (
CustomCallChecker,
CustomCallCompiler,
Expand Down
2 changes: 1 addition & 1 deletion guppy/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def get_py_scope(f: PyFunc) -> PyScope:
See https://docs.python.org/3/reference/datamodel.html#special-read-only-attributes
"""
if sys.implementation.name != "cpython":
return dict()
return {}

if inspect.ismethod(f):
f = f.__func__
Expand Down

0 comments on commit 458c721

Please sign in to comment.