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

Double quotes in errors Source file found twice, Duplicate module named, Setting "strict" not supported, bound by an outer class and cannot subclass #10513

Merged
merged 5 commits into from
May 21, 2021

Conversation

dixith
Copy link
Contributor

@dixith dixith commented May 21, 2021

Description

This pull request fixes issue reported in #7445 for errors related to Source file found twice, Duplicate module named, Setting "strict" not supported, bound by an outer class and cannot subclass

Test Plan

Updated test cases for the message. New test cases not added.

@github-actions
Copy link
Contributor

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

mitmproxy (https://github.com/mitmproxy/mitmproxy.git)
- examples/addons/anatomy.py: error: Duplicate module named 'anatomy' (also at './docs/src/examples/addons/anatomy.py')
+ examples/addons/anatomy.py: error: Duplicate module named "anatomy" (also at "./docs/src/examples/addons/anatomy.py")

ignite (https://github.com/pytorch/ignite)
- ignite/engine/deterministic.py:38: error: Class cannot subclass 'BatchSampler' (has type 'Any')  [misc]
+ ignite/engine/deterministic.py:38: error: Class cannot subclass "BatchSampler" (has type "Any")  [misc]
- ignite/distributed/auto.py:269: error: Class cannot subclass 'DistributedSampler' (has type 'Any')  [misc]
+ ignite/distributed/auto.py:269: error: Class cannot subclass "DistributedSampler" (has type "Any")  [misc]
- ignite/distributed/auto.py:337: error: Class cannot subclass 'Optimizer' (has type 'Any')  [misc]
+ ignite/distributed/auto.py:337: error: Class cannot subclass "Optimizer" (has type "Any")  [misc]
- ignite/handlers/lr_finder.py:450: error: Class cannot subclass '_LRScheduler' (has type 'Any')  [misc]
+ ignite/handlers/lr_finder.py:450: error: Class cannot subclass "_LRScheduler" (has type "Any")  [misc]

bandersnatch (https://github.com/pypa/bandersnatch.git)
- src/bandersnatch/tests/plugins/test_allowlist_name.py: error: Duplicate module named 'test_allowlist_name' (also at 'src/bandersnatch/tests/plugins/test_allowlist_name.py')
+ src/bandersnatch/tests/plugins/test_allowlist_name.py: error: Duplicate module named "test_allowlist_name" (also at "src/bandersnatch/tests/plugins/test_allowlist_name.py")

core (https://github.com/home-assistant/core.git)
- homeassistant/components/http/static.py:19: error: Class cannot subclass 'StaticResource' (has type 'Any')  [misc]
+ homeassistant/components/http/static.py:19: error: Class cannot subclass "StaticResource" (has type "Any")  [misc]
- homeassistant/components/zeroconf/models.py:10: error: Class cannot subclass 'Zeroconf' (has type 'Any')  [misc]
+ homeassistant/components/zeroconf/models.py:10: error: Class cannot subclass "Zeroconf" (has type "Any")  [misc]
- homeassistant/components/zeroconf/models.py:19: error: Class cannot subclass 'AsyncZeroconf' (has type 'Any')  [misc]
+ homeassistant/components/zeroconf/models.py:19: error: Class cannot subclass "AsyncZeroconf" (has type "Any")  [misc]
- homeassistant/components/zeroconf/models.py:33: error: Class cannot subclass 'ServiceBrowser' (has type 'Any')  [misc]
+ homeassistant/components/zeroconf/models.py:33: error: Class cannot subclass "ServiceBrowser" (has type "Any")  [misc]
- homeassistant/components/http/web_runner.py:11: error: Class cannot subclass 'BaseSite' (has type 'Any')  [misc]
+ homeassistant/components/http/web_runner.py:11: error: Class cannot subclass "BaseSite" (has type "Any")  [misc]
- homeassistant/util/yaml/loader.py:93: error: Class cannot subclass 'SafeLoader' (has type 'Any')  [misc]
+ homeassistant/util/yaml/loader.py:93: error: Class cannot subclass "SafeLoader" (has type "Any")  [misc]
- homeassistant/helpers/template.py:1361: error: Class cannot subclass 'Undefined' (has type 'Any')  [misc]
+ homeassistant/helpers/template.py:1361: error: Class cannot subclass "Undefined" (has type "Any")  [misc]
- homeassistant/helpers/template.py:1400: error: Class cannot subclass 'ImmutableSandboxedEnvironment' (has type 'Any')  [misc]
+ homeassistant/helpers/template.py:1400: error: Class cannot subclass "ImmutableSandboxedEnvironment" (has type "Any")  [misc]
- homeassistant/components/frontend/__init__.py:479: error: Class cannot subclass 'AbstractResource' (has type 'Any')  [misc]
+ homeassistant/components/frontend/__init__.py:479: error: Class cannot subclass "AbstractResource" (has type "Any")  [misc]
- homeassistant/util/ruamel_yaml.py:25: error: Class cannot subclass 'SafeConstructor' (has type 'Any')  [misc]
+ homeassistant/util/ruamel_yaml.py:25: error: Class cannot subclass "SafeConstructor" (has type "Any")  [misc]
- homeassistant/helpers/httpx_client.py:39: error: Class cannot subclass 'AsyncClient' (has type 'Any')  [misc]
+ homeassistant/helpers/httpx_client.py:39: error: Class cannot subclass "AsyncClient" (has type "Any")  [misc]

ibis (https://github.com/ibis-project/ibis.git)
- ibis/backends/hdf5/tests/conftest.py: error: Duplicate module named 'conftest' (also at 'ibis/backends/csv/tests/conftest.py')
+ ibis/backends/hdf5/tests/conftest.py: error: Duplicate module named "conftest" (also at "ibis/backends/csv/tests/conftest.py")

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! How many more are left?

@JelleZijlstra JelleZijlstra merged commit de6fd6a into python:master May 21, 2021
@dixith dixith deleted the double-quote-errors-2 branch May 22, 2021 19:40
@dixith
Copy link
Contributor Author

dixith commented May 22, 2021

Thanks! How many more are left?

@JelleZijlstra Not many. I'll try to finish the rest in 2 or 3 PRs

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