Skip to content

Update pep8-naming and fix inconsistently named TypeVar#713

Merged
bkeryan merged 4 commits intomasterfrom
users/bkeryan/update-pep8-naming
May 6, 2025
Merged

Update pep8-naming and fix inconsistently named TypeVar#713
bkeryan merged 4 commits intomasterfrom
users/bkeryan/update-pep8-naming

Conversation

@bkeryan
Copy link
Copy Markdown
Collaborator

@bkeryan bkeryan commented May 5, 2025

  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

poetry update pep8-naming

Resolve the following failure:

./tests/component/test_stream_readers_di.py:182:2: N808 type variable name '_D' should use CapWords convention and an optional '_co' or '_contra' suffix

pep8-naming is complaining that _D is covariant but it doesn't have a _co suffix. This particular type variable doesn't really need to be covariant because the _read_and_copy function return type has exactly the same data type as the argument, so I removed the covariant=True.

Originally, this also failed because pep8-naming 0.15.0 didn't allow typevars to start with an underscore, but this was fixed in pep8-naming 0.15.1.

Why should this Pull Request be merged?

Fix an incorrect type variable.

What testing has been done?

Ran poetry run nps lint and poetry run mypy

@bkeryan bkeryan requested review from maxxboehme and zhindes as code owners May 5, 2025 17:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2025

Test Results

    34 files  ±0      34 suites  ±0   58m 2s ⏱️ + 1m 15s
 2 396 tests ±0   2 042 ✅ ±0    354 💤 ±0  0 ❌ ±0 
43 102 runs  ±0  36 850 ✅ ±0  6 252 💤 ±0  0 ❌ ±0 

Results for commit 066f1aa. ± Comparison against base commit 6aa71c5.

♻️ This comment has been updated with latest results.

@bkeryan bkeryan changed the title Update pep8-naming and work around TypeVar underscore prefix error Update pep8-naming and fix inconsistently named TypeVar May 5, 2025
@bkeryan bkeryan merged commit 8b2fca1 into master May 6, 2025
17 checks passed
@bkeryan bkeryan deleted the users/bkeryan/update-pep8-naming branch May 6, 2025 17:05
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