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

Fix type errors #261

Merged
merged 1 commit into from
Feb 16, 2025
Merged

Fix type errors #261

merged 1 commit into from
Feb 16, 2025

Conversation

adamchainz
Copy link
Contributor

First, Mypy reported a lot of issues for the tests not including -> None annotations. After adding them, there were lots of issues due to the url variables being reassigned from str to DBConfig objects, fixed by inlining the URLs into the parse() calls.

Extracted from #260.

First, Mypy reported a lot of issues for the tests not including  `-> None` annotations. After adding them, there were lots of issues due to the `url` variables being reassigned from `str` to `DBConfig` objects, fixed by inlining the URLs into the `parse()` calls.
@adamchainz adamchainz mentioned this pull request Feb 14, 2025
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5106a19) to head (621806f).
Report is 18 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #261   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           76        75    -1     
  Branches        18        18           
=========================================
- Hits            76        75    -1     

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

@palfrey
Copy link
Member

palfrey commented Feb 15, 2025

First, Mypy reported a lot of issues for the tests not including -> None annotations

I'm not seeing any issues with mypy? Either in a 2 weeks ago CI run, or a local check with 1.15.0, all seemed fine.

Well, until I added tests to the list :) Can you fix the Run type checking step so this problem occurs in CI, and then I'd be happy to merge it.

@adamchainz
Copy link
Contributor Author

It failed in the original PR that I extracted this from. See e.g. https://github.com/jazzband/dj-database-url/actions/runs/13328951144/job/37228430699?pr=260

This step already runs Mypy on the test directory:

- name: Check types installation
run: |
pip install .
cd tests
python -m mypy .
python -m pyright .

Either in a 2 weeks ago CI run

That run was just before Mypy 1.15 was released the next day. So maybe 1.15 was the trigger?

@palfrey
Copy link
Member

palfrey commented Feb 16, 2025

@palfrey palfrey merged commit 5f5af49 into jazzband:master Feb 16, 2025
12 checks passed
@adamchainz adamchainz deleted the fix_mypy_errors branch February 16, 2025 23:28
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