@bhirsz While i was looking into fixing a bug i reported some time ago, i also noticed that when i run the tests, there’s plenty of warnings that are hidden by default. See PEP 597 – Add optional EncodingWarning | peps.python.org
I was about to fix those too but i also noticed that there’s mixed line feeds, while quite a few follow unix linefeeds, there’s bunch of files that are windows linefeeds:
- ./tests/linter/test_data/custom_rules/custom_rule_module_with_relative_import/single_rule.py
- ./tests/linter/test_data/custom_rules/custom_rule_module_with_relative_import/bar.py
- ./tests/linter/test_data/custom_rules/custom_rule_module_with_relative_import/foo.py
- ./tests/linter/test_disablers.py
- ./tests/linter/test_custom_rules.py
- ./tests/linter/test_empty_selects.py
- ./tests/linter/reports/test_gitlab.py
- ./tests/linter/reports/test_sonar_qube.py
- ./tests/init.py
- ./tests/formatter/test_disablers.py
- ./src/robocop/linter/sonar_qube.py
- ./src/robocop/linter/rules/tags.py
- ./src/robocop/linter/reports/gitlab.py
- ./src/robocop/linter/reports/sonarqube.py
- ./src/robocop/init.py
- ./src/robocop/formatter/utils/misc.py
- ./src/robocop/main.py
So, im asking about this cuz if i’d submit the patch, i would be the “git blame” for few files where the encoding warning is being thrown from (gitlab and sonarqube).
Another thing that i noticed, which is a bit annoying:
when running pytest from uv, repo because dirty because uv.lock removes the version:
(robotframework-robocop) rasjani@Janis-MacBook-Pro ~/src/omat/robotframework-robocop (default-encoding-fix)$ git status
On branch default-encoding-fix
nothing to commit, working tree clean
(robotframework-robocop) rasjani@Janis-MacBook-Pro ~/src/omat/robotframework-robocop (default-encoding-fix)$ uv run pytest tests > /dev/null 2>&1
(robotframework-robocop) rasjani@Janis-MacBook-Pro ~/src/omat/robotframework-robocop (default-encoding-fix *)$ git status
On branch default-encoding-fix
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: uv.lock
no changes added to commit (use "git add" and/or "git commit -a")
(robotframework-robocop) rasjani@Janis-MacBook-Pro ~/src/omat/robotframework-robocop (default-encoding-fix *)$ git --no-pager diff
diff --git i/uv.lock w/uv.lock
index 82993df..d3e1ff9 100644
--- i/uv.lock
+++ w/uv.lock
@@ -536,7 +536,6 @@ wheels = [
[[package]]
name = "robotframework-robocop"
-version = "6.0.0"
source = { editable = "." }
dependencies = [
{ name = "jinja2" },
(robotframework-robocop) rasjani@Janis-MacBook-Pro ~/src/omat/robotframework-robocop (default-encoding-fix *)$
Im not very familar with uv itself besides user but it would be nice to not get changes to repo by just running tests…