fix: Clean up whitespace and formatting in various files

This commit is contained in:
2025-05-10 07:11:40 +00:00
parent e6d03a2c2e
commit e046623d68
6 changed files with 42 additions and 29 deletions

View File

@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

View File

@@ -82,4 +82,3 @@ class MarkdownViewPlugin(AirflowPlugin):
# For Airflow to pick up the plugin, the class name must match the filename (snake_case to PascalCase)
# or be explicitly defined in an __init__.py in the plugin\'s root directory.
# Assuming filename is markdown_view_plugin.py, class MarkdownViewPlugin is correct.

View File

@@ -2,21 +2,21 @@ import React, { useEffect, useState } from 'react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import { fetchMarkdownContent } from './api';
import {
Box,
Heading,
Text,
Code,
Link,
ListItem,
OrderedList,
UnorderedList,
Table,
Thead,
Tbody,
Tr,
Th,
Td,
import {
Box,
Heading,
Text,
Code,
Link,
ListItem,
OrderedList,
UnorderedList,
Table,
Thead,
Tbody,
Tr,
Th,
Td,
Divider,
Container, // Added for layout
Flex, // Added for layout
@@ -34,13 +34,13 @@ const chakraComponents = {
code: (props: any) => {
const { inline, className, children, ...rest } = props;
return !inline ? (
<Box
as="pre"
p={4}
rounded="md"
bg="chakra-body-bg"
<Box
as="pre"
p={4}
rounded="md"
bg="chakra-body-bg"
boxShadow="sm"
overflowX="auto"
overflowX="auto"
my={2}
>
<Code className={className} bg="transparent" {...rest}>
@@ -102,10 +102,10 @@ const View: React.FC = () => {
<Container maxW="container.xl" py={6} height="100%" display="flex" flexDirection="column">
<Flex justifyContent="space-between" alignItems="center" mb={6} flexShrink={0}>
<Heading as="h1" size="lg">Markdown View</Heading>
<IconButton
aria-label="Toggle theme"
icon={colorMode === 'light' ? <MoonIcon /> : <SunIcon />}
onClick={toggleColorMode}
<IconButton
aria-label="Toggle theme"
icon={colorMode === 'light' ? <MoonIcon /> : <SunIcon />}
onClick={toggleColorMode}
/>
</Flex>
<Box p={5} borderWidth="1px" borderRadius="lg" boxShadow="md" overflowY="auto" flexGrow={1}>

View File

@@ -11,7 +11,7 @@ const config: ThemeConfig = {
const colors = {
airflow: {
50: '#EBF8FF', // Lightest blue
100: '#BEE3F8',
100: '#BEE3F8',
200: '#90CDF4',
300: '#63B3ED',
400: '#4299E1', // Primary blue