10 Commits
Author SHA1 Message Date
Krishna Chaitanyaandbogdankostic 948f21b02e chore: Add type checking to test/tracing/, test/marshal/, and test/testing/ (#10913)
* chore: add type checking to test/tracing/, test/marshal/, and test/testing/

Partially addresses #10396 by extending mypy type checking to three more
test directories. Fixes type errors including missing annotations on
pytest fixtures, unhandled Optional returns from current_span(), incorrect
generator fixture return types, and dynamic LogRecord attribute access.

* address review comments from @bogdankostic

* remove redundant assert tracer.current_span() is not None

The assertion on current_span already covers this check.

* replace getattr with direct attribute access (B009)

The hasattr guard already ensures the attribute exists, so direct
access is safe. Added type: ignore comments since LogRecord doesn't
declare operation_name in its type stubs.

* fix: address remaining PR review comments

- Remove unnecessary type: ignore[attr-defined] where hasattr guards exist
- Add type: ignore[func-returns-value] to delete_documents assertion

* fix: reformat test_logging_tracer.py to pass fmt-check

---------

Co-authored-by: bogdankostic <[email protected]>
2026-03-27 11:21:57 +01:00
Stefano Fiorucci 8091034fb5 chore: remove unused imports and enforce related Ruff rule (#10278)
* chore: remove unused imports and enforce ruff rule

* fix

* enforce f401 rule

* pylint fix
2025-12-19 18:45:44 +01:00
Sebastian Husch Leeandanakin87 85258f0654 fix: Fix types and formatting pipeline test_run.py (#9575)
* Fix types in test_run.py

* Get test_run.py to pass fmt-check

* Add test_run to mypy checks

* Update test folder to pass ruff linting

* Fix merge

* Fix HF tests

* Fix hf test

* Try to fix tests

* Another attempt

* minor fix

* fix SentenceTransformersDiversityRanker

* skip integrations tests due to model unavailable on HF inference

---------

Co-authored-by: anakin87 <[email protected]>
2025-07-03 09:49:09 +02:00
David S. Batista da60156174 chore: removing unused imports from tests (#9446) 2025-05-26 16:22:51 +00:00
Massimiliano Pippi 10c675d534 chore: add license header to all modules (#7675)
* add license header to modules
* check license header at linting time
2024-05-09 13:40:36 +00:00
Stefano Fiorucci 4912f7cb58 refactor!: improve the deserialization logic for components that use a Document Store (#6466)
* improve deserialization

* rm ds decorator

* improve tests

* fix pylint

* rm decorator from module init

* rm decorator

* rm decorator from factory

* fix tests

* release note

* rm print
2023-12-04 15:17:28 +01:00
Massimiliano Pippi 7c05f37a53 remove unit marker (#6450) 2023-11-29 19:24:25 +01:00
Massimiliano Pippi 00e1dd6eb8 chore: rearrange the core package, move tests and clean up (#6427)
* rearrange code

* fix tests

* relnote

* merge test modules

* remove extra

* rearrange draw tests

* forgot

* remove unused import
2023-11-28 09:58:56 +01:00
Silvano Cerza e6637f5ec2 Fix all tests 2023-11-24 14:48:43 +01:00
Massimiliano PippiandSilvano Cerza 8adb8bbab8 Remove preview folder in test/
---------

Co-authored-by: Silvano Cerza <[email protected]>
2023-11-24 11:52:55 +01:00