Skip to content

chore: suppress lint for import issues#18

Merged
huangrpablo merged 1 commit intomainfrom
chore/fix-lint
Jul 14, 2025
Merged

chore: suppress lint for import issues#18
huangrpablo merged 1 commit intomainfrom
chore/fix-lint

Conversation

@huangrpablo
Copy link
Copy Markdown
Contributor

Problem

Several files have imports inside methods that violate the PLC0415 linting rule:

  • batched/batch_processor.py:197 - import asyncio inside acall() method
  • batched/inference/model_batch_processor.py:134 - import asyncio inside acall() method
  • batched/utils.py:189 - import diskcache inside AsyncDiskCache.__init__() method

Solution

Add # noqa: PLC0415 comments to suppress these specific violations. The imports remain in their current locations to preserve:

  • Performance benefits of conditional importing
  • Optional dependency handling for diskcache
  • Async-only import requirements

Changes Made

  • Add # noqa: PLC0415 to asyncio imports in acall() methods
  • Add # noqa: PLC0415 to diskcache import in AsyncDiskCache.__init__()

Testing

  • make lint passes without errors
  • All existing tests continue to pass

@huangrpablo huangrpablo requested a review from aamir-s18 July 14, 2025 08:58
@huangrpablo huangrpablo merged commit f2b60d8 into main Jul 14, 2025
12 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant