Skip to content

Commit 72f888a

Browse files
bhirszd-biehl
authored andcommitted
fix(robocop): Fix circular dependency import error with Robocop 8.0+
1 parent f493f0e commit 72f888a

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ cd intellij-client
9898
hatch run test
9999

100100
# Test specific environment
101-
hatch run devel.py3.12-rf73:test
101+
hatch run devel.py312-rf73:test
102102

103103
# Coverage reporting
104104
hatch run cov

CONTRIBUTING.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ You can also check available environments with: `hatch env show`
243243

244244
1. **Create a branch:** `git checkout -b feature/your-feature-name`
245245
2. **Make your changes** following the project's coding standards
246-
3. **Run tests:** `hatch run devel.py3.12-rf73:test` (single combination for faster development)
246+
3. **Run tests:** `hatch run devel.py312-rf73:test` (single combination for faster development)
247247
4. **Run linting:** `hatch run lint:all` (or use the VS Code task)
248248
5. **Fix linting issues:** `hatch run lint:style` for formatting
249249
6. **Commit your changes** with a descriptive commit message
@@ -297,23 +297,20 @@ hatch run test.rf41:test # Robot Framework 4.1.x
297297

298298
# Run tests in specific development environments (single combination)
299299
hatch run devel:test # ⚠️ Runs ALL matrix combinations (Python 3.10-3.14 × RF 4.1-7.3)
300-
hatch run devel.py3.11-rf70:test # Python 3.11 with Robot Framework 7.0.x (single combination)
301-
hatch run devel.py3.12-rf73:test # Python 3.12 with Robot Framework 7.3.x (single combination)
302-
hatch run devel.py3.13-rf73:test # Python 3.13 with Robot Framework 7.3.x (single combination)
300+
hatch run devel.py311-rf70:test # Python 3.11 with Robot Framework 7.0.x (single combination)
301+
hatch run devel.py312-rf73:test # Python 3.12 with Robot Framework 7.3.x (single combination)
302+
hatch run devel.py313-rf73:test # Python 3.13 with Robot Framework 7.3.x (single combination)
303303

304304
# Test against development versions of Robot Framework
305305
hatch run rfbeta:test # Robot Framework beta/RC versions
306306
hatch run rfmaster:test # Robot Framework master branch
307307
hatch run rfdevel:test # Local Robot Framework development version
308-
309-
# Test with Robocop development version
310-
hatch run robocopmain:test # Robocop main branch
311308
```
312309

313310
**⚠️ Important Matrix Behavior:**
314311
- `hatch run test` executes tests for **all combinations** in the matrix (48 combinations: 6 Python versions × 8 RF versions)
315312
- `hatch run devel:test` also runs **all matrix combinations**
316-
- For faster development, use specific combinations like `hatch run devel.py3.12-rf73:test`
313+
- For faster development, use specific combinations like `hatch run devel.py312-rf73:test`
317314
- For CI/full testing, use the matrix commands
318315

319316
**Available Environment Matrix:**

hatch.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,7 @@ extra-dependencies = ["robotframework==7.2rc1"]
4949
[envs.rfmaster]
5050
python = "3.12"
5151
extra-dependencies = [
52-
"robotframework @ git+https://github.com/robotframework/robotframework.git"
53-
]
54-
55-
[envs.robocopmain]
56-
python = "3.12"
57-
extra-dependencies = [
58-
"robotframework-robocop @ git+https://github.com/MarketSquare/robotframework-robocop.git"
52+
"robotframework @ git+https://github.com/robotframework/robotframework.git",
5953
]
6054

6155
[envs.rfdevel]

packages/language_server/src/robotcode/language_server/robotframework/parts/robocop_helper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from ..protocol import RobotLanguageServerProtocol
1616

1717
if TYPE_CHECKING:
18-
from robocop.config import ConfigManager
18+
from robocop.config.manager import ConfigManager
1919

2020

2121
class RobocopConfigError(Exception):
@@ -59,7 +59,10 @@ def get_robocop_config(self, resource: Union[TextDocument, WorkspaceFolder]) ->
5959
return self.parent.workspace.get_configuration(RoboCopConfig, folder.uri)
6060

6161
def get_config_manager(self, workspace_folder: WorkspaceFolder) -> "ConfigManager":
62-
from robocop.config import ConfigManager
62+
if self.parent.robocop_helper.robocop_version >= (8, 0):
63+
from robocop.config.manager import ConfigManager
64+
else:
65+
from robocop.config import ConfigManager
6366

6467
if workspace_folder in self._config_managers:
6568
return self._config_managers[workspace_folder]

0 commit comments

Comments
 (0)