Conversation
Greptile OverviewGreptile SummaryThis PR configures Python's warnings module to display Key changes:
Observations:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Module as Module __init__.py
participant WarningsModule as Python warnings module
participant DeprecatedCode as Deprecated Code
User->>Module: Import isaaclab module
Module->>WarningsModule: warnings.filterwarnings("once", DeprecationWarning, module="isaaclab.*")
Module->>WarningsModule: warnings.filterwarnings("once", FutureWarning, module="isaaclab.*")
Note over WarningsModule: Configure filters to show warnings only once per session
User->>DeprecatedCode: Access deprecated property (1st time)
DeprecatedCode->>WarningsModule: warnings.warn(..., DeprecationWarning)
WarningsModule->>User: Display warning message
Note over WarningsModule: Record warning shown
User->>DeprecatedCode: Access same deprecated property (2nd time)
DeprecatedCode->>WarningsModule: warnings.warn(..., DeprecationWarning)
WarningsModule-->>User: Suppress warning (already shown)
Note over WarningsModule: Warning filtered out (once filter active)
|
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | ||
| import warnings |
There was a problem hiding this comment.
Move import warnings to the top of the file with other imports (line 8-9) per PEP8 conventions
| import warnings | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | ||
| import warnings |
There was a problem hiding this comment.
Move import warnings to the top of the file with other imports (line 7-8) per PEP8 conventions
| import warnings | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| __version__ = ISAACLAB_CONTRIB_METADATA["package"]["version"] | ||
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations |
There was a problem hiding this comment.
Move import warnings to the top of the file with other imports (line 6-10) per PEP8 conventions
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| __version__ = "1.0.0" | ||
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations |
There was a problem hiding this comment.
Add import warnings at the top of the file per PEP8 conventions
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| __version__ = ISAACLAB_PHYSX_METADATA["package"]["version"] | ||
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations |
There was a problem hiding this comment.
Move import warnings to the top of the file with other imports (line 6-9) per PEP8 conventions
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | ||
| import warnings |
There was a problem hiding this comment.
Add import warnings at the top of the file per PEP8 conventions
| import warnings | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| __version__ = ISAACLAB_TASKS_METADATA["package"]["version"] | ||
|
|
||
| # Configure deprecation warnings to show only once per session (regardless of call site) | ||
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations |
There was a problem hiding this comment.
Move import warnings to the top of the file with other imports (line 6-10) per PEP8 conventions
| # This prevents repeated warnings when deprecated properties are accessed from multiple locations | |
| import warnings |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Description
Warn only once. @pascal-roth I'm wondering if this should not be handled at the logger level.
Fixes # (issue)
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there