Skip to content

Commit fd72630

Browse files
author
linkmluser
committed
ruff
1 parent e2c730a commit fd72630

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

.coverage

0 Bytes
Binary file not shown.

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: OWL Server
1+
site_name: OWL MCP
22
site_description: MCP server for OWL ontology operations
33
site_author: OWL Server Team
44
site_url: https://github.com/your-username/owl-server
@@ -44,4 +44,4 @@ nav:
4444
- Development:
4545
- Contributing: development/contributing.md
4646
- Architecture: development/architecture.md
47-
- FAQ: faq.md
47+
- FAQ: faq.md

src/owl_mcp/format_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ def guess_serialization(file_path: str) -> str | None:
22
if file_path.endswith(".owl"):
33
with open(file_path) as f:
44
first_line = f.readline()
5-
if first_line.startswith("Prefix(") or first_line.startswith("Ontology("):
5+
if first_line.startswith(("Prefix(", "Ontology(")):
66
return "ofn"
77
return None
8+
return None

src/owl_mcp/owl_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ def save_ontology(self) -> None:
242242
subprocess.run(["make", MAKEFILE_NORMALIZE_RULE], check=True)
243243
except subprocess.CalledProcessError as e:
244244
# restore the backup
245-
logger.error(
245+
logger.exception(
246246
f"Error normalizing ontology: {e}, restoring backup from {backup_file_path}"
247247
)
248248
shutil.copy(backup_file_path, self.owl_file_path)
249-
raise e
249+
raise
250250
self.file_hash = self._calculate_file_hash()
251251

252252
def add_axiom(self, axiom_str: str, bypass_readonly: bool = False) -> bool:

0 commit comments

Comments
 (0)