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

pylint: silence errors on compat code for old jsonschema #1172

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

paride
Copy link
Contributor

@paride paride commented Jan 7, 2022

Proposed Commit Message

pylint: silence errors on compat code for old jsonschema

Let's silence the errors which are emitted by pylint on
a code path that exists only for backwards compatibility
with older versions of jsonschema. Pylint can't be aware
of the library version check we're doing.

Additional Context

Spotted by Jenkins:

************* Module cloudinit.config.schema
cloudinit/config/schema.py:121: [E1101(no-member), get_jsonschema_validator] Class 'Validator' has no 'DEFAULT_TYPES' member
cloudinit/config/schema.py:126: [E1123(unexpected-keyword-arg), get_jsonschema_validator] Unexpected keyword argument 'default_types' in function call

Test Steps

Run tox -e pylint on a >= Focal system and verify that pylint emits no errors.

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

@holmanb
Copy link
Member

holmanb commented Jan 7, 2022

LGTM!

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheRealFalcon
Copy link
Member

Looks like travis never reported back

@paride paride force-pushed the pylint-ignore-old-jsonschema branch from bacf231 to ab8290f Compare January 10, 2022 10:32
@paride
Copy link
Contributor Author

paride commented Jan 10, 2022

I rebased by branch and force-pushed, let's see what Travis does.

@paride
Copy link
Contributor Author

paride commented Jan 10, 2022

Travis is alive and happy now :)

@TheRealFalcon TheRealFalcon merged commit 26de41a into canonical:main Jan 10, 2022
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