Remove unused type: ignores
Not needed since update from mypy 0.770 -> 0.780.
This commit is contained in:
parent
0f30103d9c
commit
f84ffd9747
|
@ -464,8 +464,7 @@ def pytest_cmdline_main(config: Config) -> Optional[Union[int, ExitCode]]:
|
|||
|
||||
@pytest.hookimpl(tryfirst=True)
|
||||
def pytest_configure(config: Config) -> None:
|
||||
# Type ignored: pending mechanism to store typed objects scoped to config.
|
||||
config.cache = Cache.for_config(config) # type: ignore # noqa: F821
|
||||
config.cache = Cache.for_config(config)
|
||||
config.pluginmanager.register(LFPlugin(config), "lfplugin")
|
||||
config.pluginmanager.register(NFPlugin(config), "nfplugin")
|
||||
|
||||
|
|
|
@ -519,11 +519,10 @@ class MultiCapture:
|
|||
def pop_outerr_to_orig(self):
|
||||
""" pop current snapshot out/err capture and flush to orig streams. """
|
||||
out, err = self.readouterr()
|
||||
# TODO: Fix type ignores.
|
||||
if out:
|
||||
self.out.writeorg(out) # type: ignore[union-attr] # noqa: F821
|
||||
self.out.writeorg(out)
|
||||
if err:
|
||||
self.err.writeorg(err) # type: ignore[union-attr] # noqa: F821
|
||||
self.err.writeorg(err)
|
||||
return out, err
|
||||
|
||||
def suspend_capturing(self, in_: bool = False) -> None:
|
||||
|
@ -543,8 +542,7 @@ class MultiCapture:
|
|||
if self.err:
|
||||
self.err.resume()
|
||||
if self._in_suspended:
|
||||
# TODO: Fix type ignore.
|
||||
self.in_.resume() # type: ignore[union-attr] # noqa: F821
|
||||
self.in_.resume()
|
||||
self._in_suspended = False
|
||||
|
||||
def stop_capturing(self) -> None:
|
||||
|
|
|
@ -988,9 +988,7 @@ class Config:
|
|||
package_files = (
|
||||
str(file)
|
||||
for dist in importlib_metadata.distributions()
|
||||
# Type ignored due to missing stub:
|
||||
# https://github.com/python/typeshed/pull/3795
|
||||
if any(ep.group == "pytest11" for ep in dist.entry_points) # type: ignore
|
||||
if any(ep.group == "pytest11" for ep in dist.entry_points)
|
||||
for file in dist.files or []
|
||||
)
|
||||
|
||||
|
|
|
@ -66,9 +66,7 @@ def get_empty_parameterset_mark(
|
|||
fs,
|
||||
lineno,
|
||||
)
|
||||
# Type ignored because MarkDecorator.__call__() is a bit tough to
|
||||
# annotate ATM.
|
||||
return mark(reason=reason) # type: ignore[no-any-return] # noqa: F723
|
||||
return mark(reason=reason)
|
||||
|
||||
|
||||
class ParameterSet(
|
||||
|
|
|
@ -1258,7 +1258,7 @@ class TestEarlyRewriteBailout:
|
|||
|
||||
def spy_find_spec(name, path):
|
||||
self.find_spec_calls.append(name)
|
||||
return importlib.machinery.PathFinder.find_spec(name, path) # type: ignore
|
||||
return importlib.machinery.PathFinder.find_spec(name, path)
|
||||
|
||||
hook = AssertionRewritingHook(pytestconfig)
|
||||
# use default patterns, otherwise we inherit pytest's testing config
|
||||
|
|
Loading…
Reference in New Issue