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

Linting fixes #271

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Linting fixes #271

merged 1 commit into from
Aug 2, 2023

Conversation

maddenp-noaa
Copy link
Contributor

Description

I noticed that some of our test_*.py files were not being linted via make test or make lint.

Due to a known issue, pylint requires __init__.py files in directories in order to automatically discover them and test the modules in them. See e.g. pylint-dev/pylint#352. A --recursive flag was added to a recent version (see pylint-dev/pylint#3528) that was supposed to lift this requirement, but I cannot seem to make it work.

So, for now, I've added the missing __init__.py files under uwtools/tests and fixed the couple of linter errors that were then detected.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Passes make test.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas NA
  • My changes need updates to the documentation. I have made corresponding changes to the documentation NA
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published NA

Copy link
Contributor

@nbharwani11 nbharwani11 left a comment

Choose a reason for hiding this comment

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

Based on your description and the links you provided, seemed like the easy fix was adding a __init__.py file to directories without it and that allowed the files to be linted properly.
LGTM!

@WeirAE
Copy link
Contributor

WeirAE commented Aug 2, 2023

Huh! Nice catch, thanks! LGTM

@maddenp-noaa maddenp-noaa merged commit cc5a442 into ufs-community:develop Aug 2, 2023
@maddenp-noaa maddenp-noaa deleted the lint-fix branch August 2, 2023 14:50
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