-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Suggest is not None Checks for Optional Attributes in Type Annotations #17836
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
Open
hemant-iitkgp
wants to merge
3
commits into
python:master
Choose a base branch
from
hemant-iitkgp:hemant-iitkgp-issue-17036
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Suggest is not None Checks for Optional Attributes in Type Annotations #17836
hemant-iitkgp
wants to merge
3
commits into
python:master
from
hemant-iitkgp:hemant-iitkgp-issue-17036
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It looks like there's another open PR for the same issue: #17178 This fix isn't quite right, since it emits a note about class A:
pass
class B:
def bar(self):
pass
x: A | B
x.bar()
|
for more information, see https://pre-commit.ci
Diff from mypy_primer, showing the effect of this PR on open source code: check-jsonschema (https://github.com/python-jsonschema/check-jsonschema)
+ src/check_jsonschema/cli/param_types.py:90: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/check_jsonschema/cli/param_types.py:91: note: You can use "if <variable_name> is not None" check to guard against a None value
Tanjun (https://github.com/FasterSpeeding/Tanjun)
+ tanjun/dependencies/limiters.py:819: note: You can use "if <variable_name> is not None" check to guard against a None value
cki-lib (https://gitlab.com/cki-project/cki-lib)
+ cki_lib/s3bucket.py:57: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_cronjob.py:83: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_cronjob.py:109: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_cronjob.py:117: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_cronjob.py:127: note: You can use "if <variable_name> is not None" check to guard against a None value
operator (https://github.com/canonical/operator)
+ ops/lib/__init__.py:273: note: You can use "if <variable_name> is not None" check to guard against a None value
pip (https://github.com/pypa/pip)
+ src/pip/_internal/network/utils.py:65: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/network/utils.py:95: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/network/auth.py:525: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/network/auth.py:548: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/network/session.py:408: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/index/collector.py:88: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/cli/index_command.py:128: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/pip/_internal/cli/index_command.py:129: note: You can use "if <variable_name> is not None" check to guard against a None value
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/builders/html/__init__.py:409:16: note: You can use "if <variable_name> is not None" check to guard against a None value
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/gitmetadata.py:77: note: You can use "if <variable_name> is not None" check to guard against a None value
ibis (https://github.com/ibis-project/ibis)
+ ibis/backends/sql/datatypes.py:1167: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/generic.py:1269: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/generic.py:1283: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/generic.py:1459: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/generic.py:1484: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/relations.py:212: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/relations.py:226: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/relations.py:1004: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/relations.py:1005: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/relations.py:1006: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/expr/types/relations.py:3851: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/mssql/__init__.py:687: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/postgres/__init__.py:666: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/mysql/__init__.py:433: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/exasol/__init__.py:394: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/datafusion/__init__.py:339: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/datafusion/__init__.py:341: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/datafusion/__init__.py:343: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/datafusion/__init__.py:346: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/clickhouse/__init__.py:268: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/examples/gen_registry.py:329: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/tests/base.py:109: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/risingwave/__init__.py:222: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ibis/backends/druid/tests/conftest.py:86: note: You can use "if <variable_name> is not None" check to guard against a None value
urllib3 (https://github.com/urllib3/urllib3)
+ test/with_dummyserver/test_proxy_poolmanager.py:52: note: You can use "if <variable_name> is not None" check to guard against a None value
+ test/with_dummyserver/test_proxy_poolmanager.py:53: note: You can use "if <variable_name> is not None" check to guard against a None value
rich (https://github.com/Textualize/rich)
+ rich/console.py:92: note: You can use "if <variable_name> is not None" check to guard against a None value
+ rich/console.py:96: note: You can use "if <variable_name> is not None" check to guard against a None value
+ rich/console.py:100: note: You can use "if <variable_name> is not None" check to guard against a None value
pytest (https://github.com/pytest-dev/pytest)
+ testing/_py/test_local.py:860: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:863: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:914: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:916: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:925: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:926: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:931: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:942: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:1283: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:1285: note: You can use "if <variable_name> is not None" check to guard against a None value
+ testing/_py/test_local.py:1286: note: You can use "if <variable_name> is not None" check to guard against a None value
xarray (https://github.com/pydata/xarray)
+ xarray/plot/facetgrid.py:725: note: You can use "if <variable_name> is not None" check to guard against a None value
discord.py (https://github.com/Rapptz/discord.py)
+ discord/poll.py:385: note: You can use "if <variable_name> is not None" check to guard against a None value
+ discord/guild.py:3220: note: You can use "if <variable_name> is not None" check to guard against a None value
dragonchain (https://github.com/dragonchain/dragonchain)
+ dragonchain/broadcast_processor/broadcast_functions.py:95:32: note: You can use "if <variable_name> is not None" check to guard against a None value
+ dragonchain/lib/authorization.py:315:19: note: You can use "if <variable_name> is not None" check to guard against a None value
+ dragonchain/lib/authorization.py:317:25: note: You can use "if <variable_name> is not None" check to guard against a None value
+ dragonchain/lib/authorization.py:340:31: note: You can use "if <variable_name> is not None" check to guard against a None value
core (https://github.com/home-assistant/core)
+ homeassistant/components/linear_garage_door/coordinator.py:56: note: You can use "if <variable_name> is not None" check to guard against a None value
+ homeassistant/components/file_upload/__init__.py:187: note: You can use "if <variable_name> is not None" check to guard against a None value
steam.py (https://github.com/Gobot1234/steam.py)
+ steam/id.py:558: note: You can use "if <variable_name> is not None" check to guard against a None value
prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/utilities/dispatch.py:196: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/schemas/states.py:273: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/templating.py:345: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/templating.py:354: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/importtools.py:166: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/importtools.py:341: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/importtools.py:342: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/importtools.py:430: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/urls.py:245: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/utilities/urls.py:249: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/client/subscriptions.py:30: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/client/schemas/objects.py:437: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/_internal/concurrency/services.py:207: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/_internal/concurrency/services.py:212: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/client/base.py:300: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/client/base.py:514: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:79: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:791: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:819: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1090: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1100: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1104: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1108: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1113: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1160: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1167: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1171: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1177: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/blocks/core.py:1223: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/results.py:359: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/results.py:575: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/results.py:834: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/results.py:841: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/rules.py:263: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/rules.py:288: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/rules.py:291: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/rules.py:417: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/rules.py:447: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/rules.py:450: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/instrumentation_policies.py:38: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:82: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:95: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:108: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:110: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:123: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:143: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:149: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:152: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:168: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:182: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:206: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:223: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:242: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:244: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:247: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:268: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:270: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:286: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:311: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:330: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:334: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/global_policy.py:335: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:194: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:196: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:208: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:210: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:233: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:235: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:316: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:317: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:334: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:405: note: You can use "if <variable_name> is not None" check to guard against a None value
+ src/prefect/server/orchestration/core_policy.py:406: note: You can use "if <variable_name> is not None" check to guard against a None value
... (truncated 156 lines) ...
materialize (https://github.com/MaterializeInc/materialize)
+ misc/python/materialize/lint/lint.py:141: note: You can use "if <variable_name> is not None" check to guard against a None value
+ ci/mkpipeline.py:572: note: You can use "if <variable_name> is not None" check to guard against a None value
+ misc/python/materialize/cli/cloudbench.py:163: note: You can use "if <variable_name> is not None" check to guard against a None value
+ misc/python/materialize/cli/cloudbench.py:164: note: You can use "if <variable_name> is not None" check to guard against a None value
+ misc/python/materialize/parallel_workload/parallel_workload.py:357: note: You can use "if <variable_name> is not None" check to guard against a None value
mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ web/gen/web_columns.py:22: note: You can use "if <variable_name> is not None" check to guard against a None value
+ web/gen/tflow_js.py:31: note: You can use "if <variable_name> is not None" check to guard against a None value
kornia (https://github.com/kornia/kornia)
+ kornia/enhance/histogram.py:215: note: You can use "if <variable_name> is not None" check to guard against a None value
+ kornia/enhance/histogram.py:218: note: You can use "if <variable_name> is not None" check to guard against a None value
+ kornia/enhance/histogram.py:239: note: You can use "if <variable_name> is not None" check to guard against a None value
+ kornia/enhance/histogram.py:242: note: You can use "if <variable_name> is not None" check to guard against a None value
+ kornia/enhance/histogram.py:247: note: You can use "if <variable_name> is not None" check to guard against a None value
+ kornia/enhance/histogram.py:249: note: You can use "if <variable_name> is not None" check to guard against a None value
werkzeug (https://github.com/pallets/werkzeug)
+ tests/test_wrappers.py:179: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:180: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:181: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:189: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:190: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:191: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:1078: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_wrappers.py:1081: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_test.py:166: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_test.py:168: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_test.py:306: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_test.py:307: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_routing.py:601: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_routing.py:603: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_routing.py:1310: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_local.py:191: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:152: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:153: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:154: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:157: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:158: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:159: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:162: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:163: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:164: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:176: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:177: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:178: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:179: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:180: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:181: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:182: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:183: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:184: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:185: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:195: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:196: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:197: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:198: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:199: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:200: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:201: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:205: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:211: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:212: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:217: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:218: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:242: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:243: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:244: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:245: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:253: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:254: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:255: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:256: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:257: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:259: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:266: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:267: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:272: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:273: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:625: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:626: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:627: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:630: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:631: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:632: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:635: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:636: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:637: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:640: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:641: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:642: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:645: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:646: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:647: note: You can use "if <variable_name> is not None" check to guard against a None value
+ tests/test_http.py:666: note: You can use "if <variable_name> is not None" check to guard against a None value
... (truncated 89 lines) ...``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #17036
The added note makes it easier for new mypy users to understand where the errors are coming from and suggests a potentially simple fix.
Note: 'You can use "if <variable_name> is not None" check to guard against a None value'