Skip to content

Conversation

Copy link

Copilot AI commented Oct 22, 2025

This PR applies isort formatting to all Python source files in the kivy_matplotlib_widget package to ensure consistent import ordering and improve code readability.

Changes Made

All 18 Python files in the kivy_matplotlib_widget package have been reformatted with isort, which:

  • Organized imports into standard groups: Standard library imports, third-party imports (matplotlib, kivy, numpy, etc.), and local imports are now properly separated
  • Alphabetically sorted imports: Within each group, imports are now sorted alphabetically for easier scanning
  • Improved readability: Long import statements have been split across multiple lines following PEP8 guidelines
  • Added proper spacing: Consistent blank lines between import groups

Example

Before:

from kivy.properties import ObjectProperty, ListProperty, BooleanProperty, BoundedNumericProperty, AliasProperty, NumericProperty, OptionProperty
from kivy.uix.widget import Widget
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib import cbook
from kivy.metrics import dp
import numpy as np

After:

import numpy as np
from kivy.metrics import dp
from kivy.properties import (AliasProperty, BooleanProperty,
                             BoundedNumericProperty, ListProperty,
                             NumericProperty, ObjectProperty, OptionProperty)
from kivy.uix.widget import Widget
from matplotlib import cbook
from matplotlib.backends.backend_agg import FigureCanvasAgg

Verification

  • ✅ All syntax checks passed
  • ✅ isort verification confirms correct formatting
  • ✅ CodeQL security scan: 0 vulnerabilities
  • ✅ No functional changes to the code

This change makes the codebase more maintainable and follows Python community standards for import organization.

Original prompt

apply isort on all files in src


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mp-007 <19823482+mp-007@users.noreply.github.com>
Copilot AI changed the title [WIP] Apply isort on all files in src Apply isort to all Python files in kivy_matplotlib_widget package Oct 22, 2025
Copilot AI requested a review from mp-007 October 22, 2025 02:49
Copilot finished work on behalf of mp-007 October 22, 2025 02:49
@mp-007 mp-007 marked this pull request as ready for review October 22, 2025 12:48
@mp-007 mp-007 merged commit 1a38b4e into cleanup Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants