Commit Graph

83 Commits

Author SHA1 Message Date
Jirka Borovec 09de0f4f06
feat(ruff): add pytest linting rule (#2053)
* feat(ruff): add pytest linting rule
* --unsafe-fixes
* fix(pre_commit): 🎨 auto format pre-commit hooks


---------

Co-authored-by: jiri BOROVEC <jirka@Jiris-MacBook-Pro-J4N257Y6Q2.local>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-01-13 19:34:22 +01:00
Onuralp SEZER 212e69b5a4
refactor: 🧪 type hints to use the new union syntax for optional types
- Updated type hints across multiple files to replace `Optional[X]` with `X | None` for better readability and consistency.
- Added `from __future__ import annotations` to files to enable postponed evaluation of type annotations.
- Adjusted function signatures and variable types in various modules including `polygon_zone.py`, `smoother.py`, `transformers.py`, `vlm.py`, and others.
- Ensured compatibility with Python 3.10+ type hinting features.

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2025-07-15 16:36:01 +03:00
Onuralp SEZER 00fab37e58
feat: 🚀 dropping python 3.8 support and upgrade all codes to python3.9 syntax style as min
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2025-07-14 20:12:11 +03:00
rafaelpadilla b867968a10 breaking long lines, preventing E501. 2025-07-06 03:33:30 +00:00
rafaelpadilla 03430699f9 Expanded all test cases in `test_coco_annotations_to_detections` including `use_iscrowd=True` and `use_iscrowd=False`. 2025-07-06 02:07:52 +00:00
Onuralp SEZER 78f17cba2e
chore: 🧹 clean up documentation and improve formatting
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-09-27 14:18:26 +03:00
Onuralp SEZER 1f0c278c4e
refactor: ruff rules enabled and fixed and code refactor made
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-09-19 10:35:30 +03:00
Onuralp SEZER b06d979525
Merge pull request #1494 from Kadermiyanyedi/fix-test-warnings
fix(refactor): 🐞 Update deprecated usages of supervision tests to the latest version
2024-08-31 01:47:06 +03:00
Kader Miyanyedi 3c41c9721d fix: fix typos 2024-08-31 01:31:16 +03:00
Kader Miyanyedi 80567df1ea fix: fix test warnings 2024-08-31 01:21:27 +03:00
Onuralp SEZER 0edb590bb5
Merge branch 'develop' into feat/formatter-improvements 2024-08-27 14:12:14 +03:00
Onuralp SEZER a64a2fc243
fix(formatter): apply fixes from ruff and fix minor mypy and pep corrections
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2024-08-23 19:45:38 +03:00
LinasKo c3641de724 np.array -> np.ndarray 2024-08-14 12:14:26 +03:00
pre-commit-ci[bot] 7ee84c48e0 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-20 16:56:49 +00:00
magda skoczen 179d00bead merge 2024-05-20 18:56:25 +02:00
magda skoczen a40bf78bb2 coco mock method refactoring 2024-05-20 18:17:03 +02:00
pre-commit-ci[bot] 8d432c78b1 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-17 09:16:59 +00:00
magda skoczen aad5e2a212 merge seg fault fix 2024-05-17 11:11:40 +02:00
Linas Kondrackis ab775d9f76 Attempt to fix SegFault
* https://github.com/opencv/opencv-python/issues/706
2024-05-17 11:45:00 +03:00
magda skoczen 879ae9416a test polygon mask when mask in single component and no holes 2024-05-17 10:34:53 +02:00
pre-commit-ci[bot] eefa05cf01 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-16 06:40:58 +00:00
magda skoczen d8679d9c46 automatic RLE for masks with holes or in multiple pieces 2024-05-16 08:40:28 +02:00
pre-commit-ci[bot] f08404eb7d fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-15 06:56:08 +00:00
magda skoczen aab861c2db test_coco_annotations_to_detections result matrices defined in place 2024-05-15 08:55:47 +02:00
SkalskiP d21c98a4d2 docs updated; `rle_to_mask` and `mask_to_rle` added to `__init__.py` 2024-05-13 12:06:38 +02:00
magda skoczen 8c857dd9a6 speed up rle to mask 2024-05-12 23:02:22 +02:00
pre-commit-ci[bot] 008711aac4 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-08 10:50:32 +00:00
magda skoczen 649e27323d fix the line lengths 2024-05-08 12:49:25 +02:00
pre-commit-ci[bot] 36a301e7fc fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-07 16:01:37 +00:00
magda skoczen aac1d8862a assertion for valid mask in mask_to_rle function 2024-05-07 18:01:14 +02:00
magda skoczen 3618ac35ec merge 2024-05-07 17:36:26 +02:00
magda skoczen a9f821c28a Assertion error when number of pixel in RLE does not match the nuber of pixels computed as width*height 2024-05-07 17:34:13 +02:00
pre-commit-ci[bot] 6b5dacd8e3 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-06 22:22:49 +00:00
magda skoczen 88a43cc795 unit tests for rle_to_mask and mask_to_rle functions 2024-05-07 00:22:24 +02:00
pre-commit-ci[bot] a941583bb0 fix(pre_commit): 🎨 auto format pre-commit hooks 2024-05-06 21:07:51 +00:00
magda skoczen 3ade7f060a fix order caused error with mask generation in coco_annotations_to_detections 2024-05-06 22:42:26 +02:00
magda skoczen 6913ecf54d 2 annotations with segmentation, one polygon one RLE 2024-05-03 01:19:01 +02:00
magda skoczen 7f114cba4c RLE decoding 2024-05-03 00:24:46 +02:00
magda skoczen cc5e72dd5b test for RLE format 2024-05-02 22:08:08 +02:00
magda skoczen e30d4a9abb add test for generating annotation with mask 2024-05-02 12:49:31 +02:00
SkalskiP c2412379c4 Merge remote-tracking branch 'origin/feature/extend-detections-with-data-field-to-support-custom-payload' into feature/extend-detections-with-data-field-to-support-custom-payload 2023-12-29 15:16:46 +01:00
pre-commit-ci[bot] 63ccc98d0b fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-29 14:15:59 +00:00
SkalskiP 14761cb20a fix `test_detections_from_xml_obj` 2023-12-29 15:15:57 +01:00
SkalskiP 701b0c0b97 fix `test_detections_from_xml_obj` 2023-12-29 15:15:38 +01:00
pre-commit-ci[bot] b2d98fe457 fix(pre_commit): 🎨 auto format pre-commit hooks 2023-12-28 16:52:43 +00:00
SkalskiP ea6439b8fd `Detections.__eq__` updated and tested 2023-12-28 17:52:25 +01:00
Onuralp SEZER daf4046fd2
feat(xml-parsing): 🔐 enhance security with defusedxml and bandit rules
fix bandit rule B318: (xml-attribute-parsing) defusedxml package should be used to parse untrusted XML data
fix bandit rule B314: (xml-entity-expansion) XML entity expansion should be disabled
fix bandit rule B413: (xml-etree-parse) XML parsing library should be secure
fix bandit rule B412: (xml-lib-exploits) XML libraries should be vetted for defusedxml or lxml.vulns
fix bandit rule B410: (xml-minidom-xxe) XML minidom can be vulnerable to XML eXternal Entity attacks

Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
2023-12-10 13:57:51 +03:00
SkalskiP e416ef4c0e Refactor import paths and improve text file reading
Refactored import paths for test utility methods across multiple test files to align with a recent package restructure. Enriched 'read_txt_file' functionality in 'file.py' allowing to optionally skip empty lines, enhancing flexibility for various use-cases. Added tests for the new 'read_txt_file' behavior in a new 'test_file.py'. Renamed 'utils.py' in test package to 'test_utils.py' for better differentiation from the util package in the source code.
2023-11-10 10:15:08 -08:00
SkalskiP 7d449abee2 🛠️ small fix 2023-08-16 13:23:10 +02:00
SkalskiP afc240e6be 🛠️ small fix 2023-08-16 13:20:58 +02:00