Skip to content

Commit

Permalink
Avoid warning about deprecated Process class during import
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Aug 29, 2024
1 parent 9a7e6ca commit 922e451
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/changelog/next_release/+.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid showing warning about deprecated ``Process`` class during module import.
4 changes: 2 additions & 2 deletions etl_entities/process/process_stack_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations

from dataclasses import dataclass
from dataclasses import dataclass, field
from typing import ClassVar

import typing_extensions
Expand All @@ -22,7 +22,7 @@ class ProcessStackManager:
.. deprecated:: 2.0.0
"""

default: ClassVar[Process] = Process() # noqa: WPS462
default: ClassVar[Process] = field(default_factory=Process)
"Default process returned by ``ProcessStackManager.get_current``" # noqa: WPS428

_stack: ClassVar[list[Process]] = []
Expand Down

0 comments on commit 922e451

Please sign in to comment.