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

Close source files after reading them #249

Merged
merged 2 commits into from
May 19, 2020
Merged

Close source files after reading them #249

merged 2 commits into from
May 19, 2020

Conversation

cottsay
Copy link
Contributor

@cottsay cottsay commented May 18, 2020

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 <logans@cottsay.net>
@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
Copy link
Contributor

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Scott K Logan <logans@cottsay.net>
@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 <logans@cottsay.net>
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