Skip to content

Commit

Permalink
Add docstring to dependency problem
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Jan 29, 2025
1 parent b30696d commit 1f6bb2a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/databricks/labs/ucx/source_code/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,14 +488,31 @@ def __repr__(self):

@dataclass
class DependencyProblem:
"""A problem found with the dependency.
The line and column indexing is 0-based.
"""

code: str
"""Unique code to identify the problem type."""

message: str
"""A message detailing the problem."""

source_path: Path = _MISSING_SOURCE_PATH
# Lines and columns are both 0-based: the first line is line 0.
"""The path to the problem"""

start_line: int = -1
"""The line where the problem starts when reading source code."""

start_col: int = -1
"""The column where the problem starts when reading source code."""

end_line: int = -1
"""The line where the problem ends when reading source code."""

end_col: int = -1
"""The column where the problem ends when reading source code."""

def has_path_missing(self) -> bool:
"""Flag if the path is missing, or not."""
Expand Down

0 comments on commit 1f6bb2a

Please sign in to comment.