Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix formatting issues for CI checks
- Apply ruff formatting to feast/type_map.py
- Apply prettier formatting to DocumentLabelingPage.tsx
- Ensure all code follows project formatting standards

Co-Authored-By: Francisco Javier Arceo <arceofrancisco@gmail.com>
Signed-off-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
  • Loading branch information
commit 96354a63e4fb52e4b1b047bcacc8f20d031b8d9d
6 changes: 3 additions & 3 deletions sdk/python/feast/type_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ def _python_value_to_proto_value(
# Numpy convert 0 to int. However, in the feature view definition, the type of column may be a float.
# So, if value is 0, type validation must pass if scalar_types are either int or float.
allowed_types = {np.int64, int, np.float64, float, decimal.Decimal}
assert type(sample) in allowed_types, (
f"Type `{type(sample)}` not in {allowed_types}"
)
assert (
type(sample) in allowed_types
), f"Type `{type(sample)}` not in {allowed_types}"
else:
assert (
type(sample) in valid_scalar_types
Expand Down
29 changes: 17 additions & 12 deletions ui/src/pages/document-labeling/DocumentLabelingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ The final paragraph contains information about feature stores and real-time mach
});

if (range) {
const span = document.createElement('span');
span.style.backgroundColor = '#add8e6'; // Light blue
span.style.padding = '2px 4px';
span.style.borderRadius = '3px';
span.style.border = '1px solid #87ceeb';
span.setAttribute('data-temp-highlight', 'true');
const span = document.createElement("span");
span.style.backgroundColor = "#add8e6"; // Light blue
span.style.padding = "2px 4px";
span.style.borderRadius = "3px";
span.style.border = "1px solid #87ceeb";
span.setAttribute("data-temp-highlight", "true");
try {
range.surroundContents(span);
} catch (e) {
Expand All @@ -129,20 +129,25 @@ The final paragraph contains information about feature stores and real-time mach
label: labelingMode,
timestamp: Date.now(),
};

setLabels([...labels, newLabel]);
setSelectedText(null);

const selection = window.getSelection();
if (selection) {
selection.removeAllRanges();
}

const tempHighlights = document.querySelectorAll('span[data-temp-highlight="true"]');
tempHighlights.forEach(span => {

const tempHighlights = document.querySelectorAll(
'span[data-temp-highlight="true"]',
);
tempHighlights.forEach((span) => {
const parent = span.parentNode;
if (parent) {
parent.replaceChild(document.createTextNode(span.textContent || ''), span);
parent.replaceChild(
document.createTextNode(span.textContent || ""),
span,
);
parent.normalize();
}
});
Expand Down