@@ -712,13 +712,28 @@ def clear(self):
712712
713713 @_attr_setter
714714 def level (self , value ):
715- # type: (Optional[LogLevelStr]) -> None
716- """When set this overrides the level. Deprecated in favor of set_level."""
715+ # type: (LogLevelStr) -> None
716+ """
717+ When set this overrides the level.
718+
719+ .. deprecated:: 1.0.0
720+ Use :func:`set_level` instead.
721+
722+ :param value: The level to set.
723+ """
724+ logger .warning (
725+ "Deprecated: use .set_level() instead. This will be removed in the future."
726+ )
727+
717728 self ._level = value
718729
719730 def set_level (self , value ):
720- # type: (Optional[LogLevelStr]) -> None
721- """Sets the level for the scope."""
731+ # type: (LogLevelStr) -> None
732+ """
733+ Sets the level for the scope.
734+
735+ :param value: The level to set.
736+ """
722737 self ._level = value
723738
724739 @_attr_setter
@@ -827,20 +842,24 @@ def profile(self, profile):
827842
828843 self ._profile = profile
829844
830- def set_tag (
831- self ,
832- key , # type: str
833- value , # type: Any
834- ):
835- # type: (...) -> None
836- """Sets a tag for a key to a specific value."""
845+ def set_tag (self , key , value ):
846+ # type: (str, Any) -> None
847+ """
848+ Sets a tag for a key to a specific value.
849+
850+ :param key: Key of the tag to set.
851+
852+ :param value: Value of the tag to set.
853+ """
837854 self ._tags [key ] = value
838855
839- def remove_tag (
840- self , key # type: str
841- ):
842- # type: (...) -> None
843- """Removes a specific tag."""
856+ def remove_tag (self , key ):
857+ # type: (str) -> None
858+ """
859+ Removes a specific tag.
860+
861+ :param key: Key of the tag to remove.
862+ """
844863 self ._tags .pop (key , None )
845864
846865 def set_context (
@@ -849,7 +868,9 @@ def set_context(
849868 value , # type: Dict[str, Any]
850869 ):
851870 # type: (...) -> None
852- """Binds a context at a certain key to a specific value."""
871+ """
872+ Binds a context at a certain key to a specific value.
873+ """
853874 self ._contexts [key ] = value
854875
855876 def remove_context (
0 commit comments