Skip to content

Commit

Permalink
Refactor code creation in base_inspector.py
Browse files Browse the repository at this point in the history
Changed the way `Code` objects are created by setting properties individually rather than through the constructor. This enhances clarity and allows for better handling of initialization logic in future updates.
  • Loading branch information
meanmail committed Sep 26, 2024
1 parent 1ab58f7 commit 0d5905f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ def _get_inspection_result(self, code_text: str, file_path: Path) -> list[BaseIs

client = IJClient(self.host, self.port)

code = model_pb2.Code(code_text, self.language_id)
code = model_pb2.Code()
code.languageId = self.language_id
code.text = code_text

inspection_result = client.inspect(code)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hyperstyle"
version = "1.6.2"
version = "1.6.3"
description = "A tool for running a set of pre-configured linters and evaluating code quality."
authors = ["Hyperskill Team"]
readme = "README.md"
Expand Down

0 comments on commit 0d5905f

Please sign in to comment.