Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codegraphcontext/cli/registry_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def load_bundle_command(bundle_name: str, clear_existing: bool = False):
stats["nodes"] = int(part.split(":")[1].strip().replace(",", ""))
elif "Edges:" in part:
stats["edges"] = int(part.split(":")[1].strip().replace(",", ""))
except:
except (ValueError, KeyError, IndexError):
pass

return (True, message, stats)
Expand Down
10 changes: 5 additions & 5 deletions src/codegraphcontext/core/cgc_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import tempfile
from pathlib import Path
from typing import Dict, List, Optional, Any, Tuple
from datetime import datetime, date
from datetime import datetime, date, timezone
import subprocess

from codegraphcontext.utils.debug_log import debug_log, info_logger, error_logger, warning_logger
Expand Down Expand Up @@ -284,7 +284,7 @@ def _extract_metadata(self, repo_path: Optional[Path]) -> Dict[str, Any]:
"""Extract metadata about the repository and indexing process."""
metadata = {
"cgc_version": self.VERSION,
"exported_at": datetime.now().isoformat(),
"exported_at": datetime.now(timezone.utc).isoformat(),
"format_version": "1.0"
}

Expand Down Expand Up @@ -404,14 +404,14 @@ def _extract_schema(self) -> Dict[str, Any]:
try:
result = session.run("SHOW CONSTRAINTS")
schema["constraints"] = [dict(record) for record in result]
except:
except Exception:
pass

# Get indexes
try:
result = session.run("SHOW INDEXES")
schema["indexes"] = [dict(record) for record in result]
except:
except Exception:
pass

return schema
Expand Down Expand Up @@ -599,7 +599,7 @@ def _generate_stats(self, repo_path: Optional[Path], node_count: int, edge_count
stats = {
"total_nodes": node_count,
"total_edges": edge_count,
"generated_at": datetime.now().isoformat()
"generated_at": datetime.now(timezone.utc).isoformat()
}

with self.db_manager.get_driver().session() as session:
Expand Down
2 changes: 1 addition & 1 deletion src/codegraphcontext/core/database_kuzu.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def close_driver(self):
while not self._pool.empty():
try:
self._pool.get_nowait()
except:
except queue.Empty:
break
self._db = None

Expand Down
2 changes: 1 addition & 1 deletion src/codegraphcontext/core/database_ladybug.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def close_driver(self):
while not self._pool.empty():
try:
self._pool.get_nowait()
except:
except queue.Empty:
break
self._db = None

Expand Down
2 changes: 1 addition & 1 deletion src/codegraphcontext/viz/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def get_eid(element):
if not props and hasattr(node, 'items'):
try:
props = dict(node.items())
except: pass
except Exception: pass

# Extract name/label for frontend
# Prefer 'name' property, fallback to 'label', then 'path' or 'Unknown'
Expand Down
Loading