Skip to content

Commit b05f347

Browse files
committed
Relax the pylint rule for constants
1 parent dc79a14 commit b05f347

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class-naming-style=PascalCase
323323
#class-rgx=
324324

325325
# Naming style matching correct constant names.
326-
const-naming-style=UPPER_CASE
326+
const-naming-style=any
327327

328328
# Regular expression matching correct constant names. Overrides const-naming-
329329
# style.

opentelemetry-api/src/opentelemetry/context/__init__.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,11 @@ async def main():
145145
__all__ = ['Context']
146146

147147

148-
Context = ( # pylint: disable=invalid-name
149-
None
150-
) # type: typing.Optional[BaseRuntimeContext]
148+
Context = None # type: typing.Optional[BaseRuntimeContext]
151149

152150
try:
153151
from .async_context import AsyncRuntimeContext
154-
Context = AsyncRuntimeContext() # pylint:disable=invalid-name
152+
Context = AsyncRuntimeContext()
155153
except ImportError:
156154
from .thread_local_context import ThreadLocalRuntimeContext
157-
Context = ThreadLocalRuntimeContext() # pylint:disable=invalid-name
155+
Context = ThreadLocalRuntimeContext()

opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,4 @@ def use_span(self, span: 'Span') -> typing.Iterator['Span']:
346346
span.end()
347347

348348

349-
tracer = Tracer() # pylint: disable=invalid-name
349+
tracer = Tracer()

opentelemetry-sdk/src/opentelemetry/sdk/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import time
1616

1717
try:
18-
time_ns = time.time_ns # pylint: disable=invalid-name
18+
time_ns = time.time_ns
1919
# Python versions < 3.7
2020
except AttributeError:
2121
def time_ns():

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ commands =
3838
test: python -m unittest discover
3939

4040
[testenv:lint]
41+
basepython: python3.7
4142
deps =
4243
pylint~=2.3
4344
flake8~=3.7

0 commit comments

Comments
 (0)