Skip to content

Commit

Permalink
Remove pylint + mypy config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonXZLiu committed Sep 23, 2020
1 parent 08822b8 commit 279c428
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ disable=missing-docstring,
wrong-import-order, # Leave this up to isort
bad-continuation, # Leave this up to black
line-too-long, # Leave this up to black
exec-used,
unsubscriptable-object
exec-used

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
2 changes: 1 addition & 1 deletion mypy-relaxed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
disallow_untyped_calls = True
; disallow_untyped_defs = True
disallow_incomplete_defs = True
; check_untyped_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
allow_untyped_globals = True
; Due to disabling some other warnings, unused ignores may occur.
Expand Down
12 changes: 6 additions & 6 deletions opentelemetry-api/src/opentelemetry/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,27 +184,27 @@ def __new__(

@property
def trace_id(self) -> int:
return self[0]
return self[0] # pylint: disable=unsubscriptable-object

@property
def span_id(self) -> int:
return self[1]
return self[1] # pylint: disable=unsubscriptable-object

@property
def is_remote(self) -> bool:
return self[2]
return self[2] # pylint: disable=unsubscriptable-object

@property
def trace_flags(self) -> "TraceFlags":
return self[3]
return self[3] # pylint: disable=unsubscriptable-object

@property
def trace_state(self) -> "TraceState":
return self[4]
return self[4] # pylint: disable=unsubscriptable-object

@property
def is_valid(self) -> bool:
return self[5]
return self[5] # pylint: disable=unsubscriptable-object

def __setattr__(self, *args: str) -> None:
_logger.debug(
Expand Down
10 changes: 5 additions & 5 deletions opentelemetry-api/tests/trace/test_immutablespancontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ def test_attempt_change_attributes(self):
)

# attempt to change the attribute values
context.trace_id = 2
context.span_id = 3
context.is_remote = True
context.trace_flags = TraceFlags(3)
context.trace_state = TraceState([("test", "test")])
context.trace_id = 2 # type: ignore
context.span_id = 3 # type: ignore
context.is_remote = True # type: ignore
context.trace_flags = TraceFlags(3) # type: ignore
context.trace_state = TraceState([("test", "test")]) # type: ignore

# check if attributes changed
self.assertEqual(context.trace_id, 1)
Expand Down

0 comments on commit 279c428

Please sign in to comment.