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

Address complaints from pylint extensions #393

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Aug 9, 2024

The pylint redefined_variable_type extension complains:

************* Module tests.integration.test_problem_report
tests/integration/test_problem_report.py:156:8: R0204: Redefinition of tests type from list to dict (redefined-variable-type)
************* Module apport
data/apport:824:4: R0204: Redefinition of fds type from list to array.array (redefined-variable-type)

Use different variable names.

************* Module apport.report
apport/report.py:1245:15: W0714: Overlapping exceptions (OSError is an ancestor class of urllib.error.URLError) (overlapping-except)
************* Module apport.crashdb
apport/crashdb.py:311:19: W0714: Overlapping exceptions (OSError is an ancestor class of urllib.error.URLError) (overlapping-except)
************* Module apport.packaging_impl.apt_dpkg
apport/packaging_impl/apt_dpkg.py:449:15: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
apport/packaging_impl/apt_dpkg.py:1720:19: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
apport/packaging_impl/apt_dpkg.py:1770:19: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
apport/packaging_impl/apt_dpkg.py:1781:19: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.77%. Comparing base (355ba65) to head (9486594).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
apport/packaging_impl/apt_dpkg.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #393   +/-   ##
=======================================
  Coverage   82.77%   82.77%           
=======================================
  Files          98       98           
  Lines       20171    20171           
  Branches     3268     3268           
=======================================
  Hits        16697    16697           
  Misses       2956     2956           
  Partials      518      518           

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

The pylint `redefined_variable_type` extension complains:

```
************* Module tests.integration.test_problem_report
tests/integration/test_problem_report.py:156:8: R0204: Redefinition of tests type from list to dict (redefined-variable-type)
************* Module apport
data/apport:824:4: R0204: Redefinition of fds type from list to array.array (redefined-variable-type)
```

Use different variable names.
```
************* Module apport.report
apport/report.py:1245:15: W0714: Overlapping exceptions (OSError is an ancestor class of urllib.error.URLError) (overlapping-except)
************* Module apport.crashdb
apport/crashdb.py:311:19: W0714: Overlapping exceptions (OSError is an ancestor class of urllib.error.URLError) (overlapping-except)
************* Module apport.packaging_impl.apt_dpkg
apport/packaging_impl/apt_dpkg.py:449:15: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
apport/packaging_impl/apt_dpkg.py:1720:19: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
apport/packaging_impl/apt_dpkg.py:1770:19: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
apport/packaging_impl/apt_dpkg.py:1781:19: W0714: Overlapping exceptions (urllib.error.URLError is an ancestor class of urllib.error.HTTPError) (overlapping-except)
```
@schopin-pro schopin-pro merged commit eceaf7b into canonical:main Oct 4, 2024
18 of 19 checks passed
@schopin-pro
Copy link
Contributor

Coverage was angry because you touched error paths that aren't yet tested, I'm fine with it.

@bdrung bdrung deleted the fix-pylint-extensions branch October 4, 2024 14:43
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