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

style: followup for recent ansible-lint related changes #179

Merged
merged 5 commits into from
Jan 12, 2024

Conversation

tomjelinek
Copy link
Member

This branch updates downstream GitLab CI configuration to match changes done to upstream CI to support recent ansible-lint. It also fixes issues reported by woke, isort, pylint and mypy linters.

- remove Python 2 bits as minimal supported version is Python 3.9
- silence linters for incomplete stub classes for failed imports
- minor type annotations fixes
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (820899d) 76.53% compared to head (ca44425) 76.79%.

Files Patch % Lines
library/pcs_api_v2.py 33.33% 4 Missing ⚠️
library/pcs_qdevice_certs.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #179      +/-   ##
==========================================
+ Coverage   76.53%   76.79%   +0.25%     
==========================================
  Files           3        3              
  Lines         179      181       +2     
  Branches       12       12              
==========================================
+ Hits          137      139       +2     
  Misses         42       42              
Flag Coverage Δ
sanity 50.54% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# pylint: enable=no-name-in-module
try:
from pcs.common.async_tasks.dto import CommandDto, CommandOptionsDto
except ImportError:
HAS_PCS = False
PCS_IMPORT_ERROR = traceback.format_exc()
PCS_IMPORT_ERROR: Optional[str] = traceback.format_exc()

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'PCS_IMPORT_ERROR' is not used.
# pylint: enable=no-name-in-module
try:
from pcs.common.async_tasks.dto import CommandDto, CommandOptionsDto
except ImportError:
HAS_PCS = False
PCS_IMPORT_ERROR = traceback.format_exc()
PCS_IMPORT_ERROR: Optional[str] = traceback.format_exc()

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'PCS_IMPORT_ERROR' is not used.
@tomjelinek tomjelinek changed the title CI and style fixes - followup for recent ansible-lint related changes style: CI and style fixes - followup for recent ansible-lint related changes Jan 12, 2024
@tomjelinek tomjelinek changed the title style: CI and style fixes - followup for recent ansible-lint related changes style: followup for recent ansible-lint related changes Jan 12, 2024
@tomjelinek
Copy link
Member Author

[citest]

@tomjelinek tomjelinek merged commit 8901f83 into linux-system-roles:main Jan 12, 2024
32 of 35 checks passed
@tomjelinek tomjelinek deleted the ci-and-style-fixes branch January 12, 2024 15:41
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.

2 participants