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

tmp #3

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

tmp #3

wants to merge 1 commit into from

Conversation

hauntsaninja
Copy link
Owner

No description provided.

@github-actions
Copy link

Diff from mypy_primer, showing the effect of this PR on open source code:

pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/pytables.py:4666: error: Item "Index" of "ndarray[Any, Any] | Index" has no attribute "reshape"  [union-attr]
+ pandas/io/formats/format.py:316: error: Incompatible types in assignment (expression has type "int", variable has type "Literal[1]")  [assignment]

cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/url_helper.py:301: error: Invalid index type "str" for "dict[Literal['headers'], Any]"; expected type "Literal['headers']"  [index]

starlette (https://github.com/encode/starlette)
+ tests/test_datastructures.py:301: error: Non-overlapping equality check (left operand type: "Literal[4]", right operand type: "Literal[19]")  [comparison-overlap]
+ tests/test_datastructures.py:334: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[4]")  [comparison-overlap]
+ tests/test_responses.py:123: error: Non-overlapping equality check (left operand type: "Literal['']", right operand type: "Literal['6, 7, 8, 9']")  [comparison-overlap]
+ tests/test_responses.py:245: error: Non-overlapping equality check (left operand type: "Literal['']", right operand type: "Literal['6, 7, 8, 9']")  [comparison-overlap]
+ tests/test_applications.py:536: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]

mypy (https://github.com/python/mypy)
+ mypy/stubgen.py:1472: error: Left operand of "or" is always false  [redundant-expr]
+ mypy/stubgen.py:1472: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-redundant-expr for more info

jinja (https://github.com/pallets/jinja)
+ src/jinja2/parser.py:396: error: Non-overlapping equality check (left operand type: "Literal['name']", right operand type: "Literal['comma']")  [comparison-overlap]
+ src/jinja2/parser.py:848: error: Statement is unreachable  [unreachable]
+ src/jinja2/parser.py:860: error: Statement is unreachable  [unreachable]
+ src/jinja2/filters.py:683: error: Statement is unreachable  [unreachable]

psycopg (https://github.com/psycopg/psycopg)
+ tests/pool/test_pool_async.py:180: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/pool/test_pool_async.py:182: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pool/test_pool_async.py:235: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/pool/test_pool_async.py:993: error: Non-overlapping equality check (left operand type: "Literal[4]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/pool/test_pool.py:183: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/pool/test_pool.py:185: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pool/test_pool.py:238: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/pool/test_pool.py:1032: error: Non-overlapping equality check (left operand type: "Literal[4]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/pool/test_null_pool_async.py:129: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/pool/test_null_pool_async.py:131: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pool/test_null_pool_async.py:137: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pool/test_null_pool_async.py:208: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/pool/test_null_pool.py:127: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/pool/test_null_pool.py:129: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pool/test_null_pool.py:135: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pool/test_null_pool.py:207: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]

black (https://github.com/psf/black)
+ src/blib2to3/pgen2/pgen.py:298:13: error: Statement is unreachable  [unreachable]

zetta_utils (https://github.com/ZettaAI/zetta_utils)
+ zetta_utils/mazepa/autoexecute_task_queue.py:37: error: Statement is unreachable  [unreachable]

operator (https://github.com/canonical/operator)
+ ops/pebble.py:2571: error: Redundant cast to "Literal['response', 'files']"  [redundant-cast]

pytest (https://github.com/pytest-dev/pytest)
+ testing/test_monkeypatch.py:39: error: Non-overlapping equality check (left operand type: "Literal[2]", right operand type: "Literal[3]")  [comparison-overlap]
+ testing/test_monkeypatch.py:40: error: Statement is unreachable  [unreachable]
+ testing/test_monkeypatch.py:48: error: Unused "type: ignore" comment  [unused-ignore]
+ testing/test_monkeypatch.py:70: error: Statement is unreachable  [unreachable]
+ testing/test_monkeypatch.py:113: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[5]")  [comparison-overlap]
+ testing/test_monkeypatch.py:114: error: Statement is unreachable  [unreachable]
+ testing/test_monkeypatch.py:127: error: Non-overlapping equality check (left operand type: "Literal[2]", right operand type: "Literal[3]")  [comparison-overlap]
+ testing/test_monkeypatch.py:128: error: Statement is unreachable  [unreachable]
+ testing/test_monkeypatch.py:427: error: Non-overlapping equality check (left operand type: "Literal[2]", right operand type: "Literal[1]")  [comparison-overlap]
+ testing/test_doctest.py:1580: error: Statement is unreachable  [unreachable]
+ testing/test_doctest.py:1584: error: Unused "type: ignore" comment  [unused-ignore]
+ testing/test_doctest.py:1585: error: Statement is unreachable  [unreachable]
+ testing/test_compat.py:211: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ testing/test_compat.py:212: error: Statement is unreachable  [unreachable]
+ testing/code/test_excinfo.py:870: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[3]")  [comparison-overlap]

optuna (https://github.com/optuna/optuna)
+ tests/samplers_tests/test_qmc.py:113: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/samplers_tests/test_qmc.py:140: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/samplers_tests/test_qmc.py:160: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/samplers_tests/test_nsgaiii.py:256: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/samplers_tests/test_nsgaii.py:751: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/samplers_tests/test_nsgaii.py:789: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]
+ tests/trial_tests/test_trial.py:255: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/samplers_tests/test_samplers.py:820: error: Non-overlapping equality check (left operand type: "Literal[1]", right operand type: "Literal[2]")  [comparison-overlap]
+ tests/samplers_tests/test_samplers.py:844: error: Non-overlapping equality check (left operand type: "Literal[0]", right operand type: "Literal[1]")  [comparison-overlap]

discord.py (https://github.com/Rapptz/discord.py)
- discord/mentions.py:126: error: Item "bool" of "bool | Sequence[Snowflake]" has no attribute "__iter__" (not iterable)  [union-attr]
- discord/mentions.py:131: error: Item "bool" of "bool | Sequence[Snowflake]" has no attribute "__iter__" (not iterable)  [union-attr]
- discord/mentions.py:134: error: Incompatible types in assignment (expression has type "bool", target has type "list[Any | int]")  [assignment]
+ discord/mentions.py:134: error: Incompatible types in assignment (expression has type "bool", target has type "list[int]")  [assignment]
- discord/mentions.py:136: error: Incompatible types in assignment (expression has type "list[str]", target has type "list[Any | int]")  [assignment]
+ discord/mentions.py:136: error: Incompatible types in assignment (expression has type "list[str]", target has type "list[int]")  [assignment]

rich (https://github.com/Textualize/rich)
+ rich/progress.py:1021: error: Statement is unreachable  [unreachable]

streamlit (https://github.com/streamlit/streamlit)
+ lib/tests/streamlit/watcher/event_based_path_watcher_test.py: note: In member "test_multiple_watchers_same_file" of class "EventBasedPathWatcherTest":
+ lib/tests/streamlit/watcher/event_based_path_watcher_test.py:281:16: error: Non-overlapping equality check (left operand type: "Literal[2]", right operand type: "Literal[1]")  [comparison-overlap]
+ lib/tests/streamlit/watcher/event_based_path_watcher_test.py:283:9: error: Statement is unreachable  [unreachable]

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.

1 participant