Skip to content

Commit

Permalink
Document the latest code change a bit better.
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsadhwani committed Aug 16, 2024
1 parent b881597 commit 4f50553
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pytest_beartype/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ def pytest_configure(config: "pytest.Config") -> None:
import sys
from warnings import warn

stdlib_module_names = getattr(sys, "stdlib_module_names", [])

class BeartypePytestWarning(BeartypeWarning):
"""
Beartype :mod:`pytest` warning.
Expand All @@ -50,6 +48,12 @@ class BeartypePytestWarning(BeartypeWarning):
under the active Python interpreter.
"""

# This (and `sys.builtin_module_names`) will be used to filter out
# already-imported modules from the warning message (about the fact that
# some modules have already been imported and will not be checked), whenever
# `--beartype-packages=*` or `--beartype-skip-packages` flags are used.
stdlib_module_names = getattr(sys, "stdlib_module_names", [])

# Tuple of the subset of these names corresponding to previously
# imported packages and modules under the active Python interpreter.
if "*" in package_names:
Expand Down

0 comments on commit 4f50553

Please sign in to comment.