Skip to content

Commit 9e71d44

Browse files
committed
Ignore lint error for f_generator
1 parent 32eed1c commit 9e71d44

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ release:
3535
@rm -rf dist/*
3636
python3 -m build || exit
3737
python3 -m twine upload --repository objsize dist/*
38+
39+
lint:
40+
black objsize --check --diff
41+
black ./*.py --check --diff
42+
flake8 objsize --count --select=E,F,W,C --show-source --max-complexity=10 --max-line-length=120 --statistics --per-file-ignores='__init__.py:F401'
43+
pylint objsize -v
44+
mypy objsize --check-untyped-defs

objsize/traverse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def traverse_exclusive_bfs(self, *objs: Any) -> Iterator[Any]:
348348
current_frame = inspect.currentframe()
349349
frame_ids = {id(current_frame), id(subtree)}
350350
if hasattr(current_frame, "f_generator"):
351-
frame_ids.add(id(current_frame.f_generator))
351+
frame_ids.add(id(current_frame.f_generator)) # type: ignore[union-attr]
352352
frame_set = self.marked_set | frame_ids
353353

354354
# We first make sure that any "old" objects that may refer to our subtree were collected.

0 commit comments

Comments
 (0)