Skip to content

Conversation

@mshafer-NI
Copy link
Collaborator

Fix #83

Fix issue where non-aggressive was moving comments off the correct line (affecting test)

  • Wrote a failing test that showed error
  • Fix parameters to second call (for --aggressive) to _acknowledge_existing_errors.acknowledge_lint_errors
  • extract formatting imports to _fix._format_imports
  • Create:
    • _utils.temp_file.multi_access_tempfile to simplify working on imports section alone
    • _utils.code_analysis.find_import_region to simplify identifying the imports section
  • Re-work _fix._format_imports to use these to take take only the import/docstring lines at the start of the file and condense them.
  • Test now passes

@mshafer-NI mshafer-NI requested review from irwand and neilvana as code owners May 9, 2022 16:39
@mshafer-NI mshafer-NI merged commit 30f3db8 into ni:main May 9, 2022
@mshafer-NI mshafer-NI deleted the fix_bug_83 branch May 9, 2022 17:25
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.

TypeError: acknowledge_lint_errors() got an unexpected keyword argument 'errors_in_file'

2 participants