mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 20:52:57 +08:00
Fix lint by making pkg tests folders namespace pkgs (#131)
This commit is contained in:

committed by
GitHub

parent
28c1331e57
commit
eb53012a8c
@ -4,4 +4,3 @@ omit =
|
|||||||
*/setup.py
|
*/setup.py
|
||||||
*/gen/*
|
*/gen/*
|
||||||
reference/*
|
reference/*
|
||||||
opentelemetry-python-core/*
|
|
||||||
|
@ -7,7 +7,7 @@ extension-pkg-whitelist=
|
|||||||
|
|
||||||
# Add list of files or directories to be excluded. They should be base names, not
|
# Add list of files or directories to be excluded. They should be base names, not
|
||||||
# paths.
|
# paths.
|
||||||
ignore=CVS,gen,opentelemetry-python-core
|
ignore=CVS,gen
|
||||||
|
|
||||||
# Add files or directories matching the regex patterns to be excluded. The
|
# Add files or directories matching the regex patterns to be excluded. The
|
||||||
# regex matches against base names, not paths.
|
# regex matches against base names, not paths.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
pylint~=2.3
|
pylint==2.4.4
|
||||||
flake8~=3.7
|
flake8~=3.7
|
||||||
isort~=4.3
|
isort~=4.3
|
||||||
black>=19.3b0,==19.*
|
black>=19.3b0,==19.*
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright The OpenTelemetry Authors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
# IMPORTANT: Only the wsgi module needs this because it is always the first
|
||||||
|
# package that uses the `{rootdir}/*/tests/` path and gets installed by
|
||||||
|
# `eachdist.py` and according to `eachdist.ini`.
|
||||||
|
|
||||||
|
# Naming the tests module as a namespace package ensures that
|
||||||
|
# relative imports will resolve properly for subsequent test packages,
|
||||||
|
# as it enables searching for a composite of multiple test modules.
|
||||||
|
pkg_resources.declare_namespace(__name__)
|
||||||
|
@ -3,8 +3,7 @@ line-length = 79
|
|||||||
exclude = '''
|
exclude = '''
|
||||||
(
|
(
|
||||||
/(
|
/(
|
||||||
reference| # original files from DataDog
|
reference # original files from DataDog
|
||||||
opentelemetry-python-core
|
|
||||||
)/
|
)/
|
||||||
)
|
)
|
||||||
'''
|
'''
|
||||||
|
14
tox.ini
14
tox.ini
@ -262,16 +262,6 @@ commands =
|
|||||||
basepython: python3.8
|
basepython: python3.8
|
||||||
recreate = True
|
recreate = True
|
||||||
deps =
|
deps =
|
||||||
-e {toxinidir}/opentelemetry-python-core/opentelemetry-proto
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/opentelemetry-api
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/opentelemetry-sdk
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/opentelemetry-proto
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/tests/util
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-jaeger
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-zipkin
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-prometheus
|
|
||||||
-e {toxinidir}/opentelemetry-python-core/exporter/opentelemetry-exporter-otlp
|
|
||||||
-c dev-requirements.txt
|
-c dev-requirements.txt
|
||||||
pylint
|
pylint
|
||||||
flake8
|
flake8
|
||||||
@ -282,6 +272,10 @@ deps =
|
|||||||
httpretty
|
httpretty
|
||||||
|
|
||||||
commands_pre =
|
commands_pre =
|
||||||
|
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-api
|
||||||
|
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-sdk
|
||||||
|
python -m pip install {toxinidir}/opentelemetry-python-core/tests/util
|
||||||
|
python -m pip install {toxinidir}/opentelemetry-python-core/opentelemetry-instrumentation
|
||||||
python scripts/eachdist.py install --editable --with-test-deps
|
python scripts/eachdist.py install --editable --with-test-deps
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
|
Reference in New Issue
Block a user