Skip to content

Commit

Permalink
pyre: Finally, remove obsolete pyre error suppressions
Browse files Browse the repository at this point in the history
Signed-off-by: Bernhard Kaindl <[email protected]>
  • Loading branch information
bernhardkaindl committed Nov 15, 2024
1 parent c1ebd7b commit 88ad644
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
This module is run automatically by pytest to define and enable fixtures.
"""

# pyre-ignore-all-errors[21]
import warnings

import pytest # pyre does not find the module when run by tox -e py311-pyre
import pytest


@pytest.fixture(autouse=True)
def set_warnings():
Expand Down
1 change: 0 additions & 1 deletion tests/test_cpiofile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# suppress false positive on pytest missing pytest.raises():
# pyre-ignore-all-errors[16]
"""
Test various modes of creating and extracting CpioFile using different compression
types, opening the archive as stream and as file, using pyfakefs as filesystem without
Expand Down
1 change: 0 additions & 1 deletion tests/test_httpaccessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def http_get_request_data(self, url, read_file, error_handler):

def assert_http_get_request_data(self, url, read_file, error_handler):
# type:(str, str, ErrorHandler) -> HTTPAccessor
# pyre-ignore[23]: silence false positive
with self.http_get_request_data(url, read_file, error_handler) as (httpaccessor, ref):
http_accessor_filehandle = httpaccessor.openAddress(read_file)
if sys.version_info >= (3, 0):
Expand Down
1 change: 0 additions & 1 deletion xcp/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"""accessor - provide common interface to access methods"""

import errno
# pyre-ignore-all-errors[6,16]
import ftplib
import io
import os
Expand Down
1 change: 0 additions & 1 deletion xcp/bootloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

import xcp.cmd

# pyre-ignore-all-errors[21]
try: # xenserver-release.rpm puts a branding.py into our xcp installation directory:
from xcp import branding # type:ignore[attr-defined] # pytype: disable=import-error
except ImportError: # For CI, use stubs/branding.py (./stubs is added to pythonpath)
Expand Down
2 changes: 0 additions & 2 deletions xcp/cpiofile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
Derived from Lars Gustäbel's tarfile.py
"""
from __future__ import print_function
# pyre is not as good as other static analysis tools in inferring the correct types:
# pyre-ignore-all-errors[6,16]

__version__ = "0.1"
__author__ = "Simon Rowe"
Expand Down

0 comments on commit 88ad644

Please sign in to comment.