Skip to content

Close source files after reading them - #249

Merged
cottsay merged 2 commits into
masterfrom
resource_warning
May 19, 2020
Merged

cottsay merged 2 commits into
masterfrom
resource_warning

Conversation

@cottsay

@cottsay cottsay commented May 18, 2020 •

Copy link
Copy Markdown
Contributor

Resolves the ResourceWarning messages coming to the console during testing with debug-enabled Python. These messages cause a significant amount of noise on the console.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Example warning:

C:\ci\ws\install\Lib\site-packages\ament_lint_cmake\cmakelint.py:408: ResourceWarning: unclosed file <_io.TextIOWrapper name='CMakeLists.txt' mode='r' encoding='cp1252'>
  for l in open(filename).readlines():
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Resolves the ResourceWarning messages coming to the console during
testing with debug-enabled Python.

Signed-off-by: Scott K Logan <[email protected]>
@cottsay cottsay added bug Something isn't working in review Waiting for review (Kanban column) labels May 18, 2020
@cottsay cottsay self-assigned this May 18, 2020

@jacobperron jacobperron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread ament_cpplint/ament_cpplint/cpplint.py Resolved
@cottsay
cottsay force-pushed the resource_warning branch from 623b8f7 to 341a820 Compare May 19, 2020 02:07
@cottsay
cottsay merged commit a11ea56 into master May 19, 2020
@delete-merged-branch
delete-merged-branch Bot deleted the resource_warning branch May 19, 2020 02:23
kenji-miyake pushed a commit to kenji-miyake/ament_lint that referenced this pull request Oct 20, 2021
Resolves the ResourceWarning messages coming to the console during
testing with debug-enabled Python.

Signed-off-by: Scott K Logan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working in review Waiting for review (Kanban column)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants