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

1
.gitignore vendored
View File

@@ -300,4 +300,3 @@ dist
.yarn/install-state.gz .yarn/install-state.gz
.pnp.* .pnp.*
.pnpm-store/ .pnpm-store/

View File

@@ -1,3 +1,3 @@
# Airflow3Plugin # Airflow3Plugin
Plugins for Airflow 3 Plugins for Airflow 3

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

View File

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