Robocop question regarding contributing

@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…

Ok, regarding the uv.lock, i found `uv run` changes uv.lock files · Issue #10845 · astral-sh/uv · GitHub - and i can fix the issue by setting UV_FROZEN to 1.

Thanks for reaching out, you are actually pointing out to issues that plagued me since I have merged two repositories into one - but I focused on fixing other issues first.
I didnt see those encoding issues, thanks. Its fine to follow unix feed everywhere, its leftover from script that merged multiple commits during migration. Its fine if git blame is polluted during this change.

I’m also getting the issue with version being removed, it actually looks like a bug in uv, especially it also happens to you. I can look into it how it can be workarounded or fixed, for now dont worry about it and simply do not commit changes in uv.lock file.

wt., 22 kwi 2025, 21:14 użytkownik not available via Robot Framework <notifications@robotframework1.discoursemail.com> napisał: