Skip to content

Commit 89082e5

Browse files
committed
Workaround mypy issues
1 parent 485be68 commit 89082e5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

ext/opentelemetry-ext-flask/src/opentelemetry/ext/flask/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ def __init__(self):
114114
def patch(self):
115115
flask.Flask = _PatchedFlask
116116

117-
patch.var = 99
118-
119117
def unpatch(self):
120118
flask.Flask = self._original_flask
121119

opentelemetry-api/src/opentelemetry/patcher/base_patcher.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
# type: ignore
1415

1516
from abc import ABC, abstractmethod
1617
from functools import wraps
@@ -23,7 +24,7 @@ class BasePatcher(ABC):
2324
"""An ABC for patchers"""
2425

2526
@staticmethod
26-
def protect(class_) -> None: # type: ignore[no-untyped-def]
27+
def protect(class_) -> None:
2728
"""
2829
Provides a class decorator that protects patch and unpatch methods
2930

opentelemetry-api/src/opentelemetry/patcher/no_op_patcher.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from opentelemetry.patcher.base_patcher import BasePatcher
15+
from opentelemetry.patcher.base_patcher import BasePatcher # type: ignore
1616

1717

18-
class NoOpPatcher(BasePatcher):
18+
class NoOpPatcher(BasePatcher): # type: ignore
1919
def patch(self) -> None:
2020
"""Patch"""
2121

opentelemetry-api/tests/patcher/test_patcher.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
# type: ignore
1415

1516
from unittest import TestCase
1617

0 commit comments

Comments
 (0)