Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor import statements in _formats.py #450

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

jrycw
Copy link
Collaborator

@jrycw jrycw commented Sep 17, 2024

This PR focuses on cleaning up the import statements in _formats.py:

  • Moved import re and from dataclasses import dataclass to the top, as they were previously placed near the end of the file.
  • Removed the redundant local import of import re, now handled at the top level.
  • Eliminated the local import of from pathlib import Path within a function, as Path is already imported at the top level and is required for type hints in other functions.

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.73%. Comparing base (ea03bbc) to head (e91bbaa).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   86.75%   86.73%   -0.02%     
==========================================
  Files          42       42              
  Lines        4702     4698       -4     
==========================================
- Hits         4079     4075       -4     
  Misses        623      623              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@machow machow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for tidying this up

Copy link
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rich-iannone rich-iannone merged commit 079dc83 into posit-dev:main Sep 18, 2024
13 checks passed
@jrycw jrycw deleted the organize-imports branch September 18, 2024 16:15
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.

3 participants