Skip to content

Conversation

robsdedude
Copy link

@robsdedude robsdedude commented Aug 21, 2022

The config option lines_before_import was ignored if the file only contained
imports + optionally a leading comment.

Fixes #1964

@robsdedude
Copy link
Author

@timothycrosley this is ready for review. It'd be great if this could be discussed and resolved before it starts lacking behind even more.

@DanielNoord
Copy link
Member

@robsdedude Are you still interested in pursuing this? We could rebase this and get this reviewed :)

@robsdedude
Copy link
Author

Hi @DanielNoord, yes please. I've been patiently waiting for a review :) I've merged main into the PR so it's ready for a review.

Copy link

codecov bot commented Oct 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.19%. Comparing base (cc04d6a) to head (e39c314).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1965   +/-   ##
=======================================
  Coverage   99.19%   99.19%           
=======================================
  Files          40       40           
  Lines        3105     3106    +1     
  Branches      681      681           
=======================================
+ Hits         3080     3081    +1     
  Misses         14       14           
  Partials       11       11           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

One comment/nit about typing in the tests. Otherwise LGTM and I'll merge after that is fixed :)

@DanielNoord
Copy link
Member

@robsdedude Since we use the merge queue I can't squash your commits myself. Could you perhaps squash the commits so I can merge this into main cleanly?

The config option `lines_before_import` was ignored if the file only contained
imports + optionally a leading comment.
@robsdedude robsdedude force-pushed the fix/lbi-empty-only-import-files branch from e39c314 to 043261f Compare October 5, 2025 19:05
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.

lines_before_import is being ignored for files that only contain imports and comments
2 participants