Skip to content

Commit 4325dea

Browse files
committed
Enabled flake8-tidy-imports for ruff linter
1 parent 5430c75 commit 4325dea

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def _safe_end_processing_span(receipt_handle: str) -> None:
188188
@staticmethod
189189
def _extract_queue_name_from_url(queue_url: str) -> str:
190190
# A Queue name cannot have the `/` char, therefore we can return the part after the last /
191-
return queue_url.split("/")[-1]
191+
return queue_url.rsplit("/", maxsplit=1)[-1]
192192

193193
def _create_processing_span(
194194
self,

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,15 @@ select = [
171171
"PLE", # pylint error
172172
"Q", # flake8-quotes
173173
"A", # flake8-builtins
174+
"TID", # flake8-tidy-imports
174175
]
175176
ignore = [
176177
"E501", # line-too-long
177178
]
178179

179180
[tool.ruff.lint.per-file-ignores]
180181
"docs/**/*.*" = ["A001"]
182+
"instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/*" = ["TID252"]
181183

182184
[tool.ruff.lint.isort]
183185
detect-same-package = false # to not consider instrumentation packages as first-party

0 commit comments

Comments
 (0)