Skip to content

Commit 5458ab0

Browse files
committed
Removing unneeded # type: ignore comments.
1 parent cf35573 commit 5458ab0

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

domdf_python_tools/delegators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _f(f: Callable):
8282

8383
f.__signature__ = from_sig.replace( # type: ignore
8484
parameters=[*from_params.values(), *to_params.values()]
85-
) # type: ignore
85+
)
8686
f.__annotations__ = {**to_annotations, **from_annotations}
8787

8888
return f

domdf_python_tools/pagesizes/classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def __new__(cls, width: AnyNumber, height: AnyNumber, unit: AnyNumber = pt):
226226
:param unit:
227227
"""
228228

229-
width, height = convert_from((width, height), unit) # type: ignore
229+
width, height = convert_from((width, height), unit)
230230
return super().__new__(cls, width, height)
231231

232232
@property

domdf_python_tools/paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def open( # type: ignore # noqa A003
524524
else:
525525
newline = "\n"
526526

527-
return super().open( # type: ignore # yapf: disable
527+
return super().open(
528528
mode,
529529
buffering=buffering,
530530
encoding=encoding,

domdf_python_tools/pretty_print.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def __repr__(self):
192192

193193
class ReprPrettyPrinter(FancyPrinter):
194194

195-
_dispatch = dict(FancyPrinter._dispatch) # type: ignore
195+
_dispatch = dict(FancyPrinter._dispatch)
196196

197197
def format_attributes(self, obj: Attributes):
198198
stream = StringIO()

tests/test_paths_stdlib.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_unlink(self):
233233
def test_unlink_missing_ok(self):
234234
p = PathPlus(BASE) / "fileAAA"
235235
self.assertFileNotFound(p.unlink)
236-
p.unlink(missing_ok=True) # type: ignore
236+
p.unlink(missing_ok=True)
237237

238238
def test_rmdir(self):
239239
p = PathPlus(BASE) / "dirA"
@@ -541,13 +541,13 @@ def test_is_file(self):
541541
def test_is_mount(self):
542542
P = PathPlus(BASE)
543543
R = PathPlus("/") # TODO: Work out Windows.
544-
self.assertFalse((P / "fileA").is_mount()) # type: ignore
545-
self.assertFalse((P / "dirA").is_mount()) # type: ignore
546-
self.assertFalse((P / "non-existing").is_mount()) # type: ignore
547-
self.assertFalse((P / "fileA" / "bah").is_mount()) # type: ignore
548-
self.assertTrue(R.is_mount()) # type: ignore
544+
self.assertFalse((P / "fileA").is_mount())
545+
self.assertFalse((P / "dirA").is_mount())
546+
self.assertFalse((P / "non-existing").is_mount())
547+
self.assertFalse((P / "fileA" / "bah").is_mount())
548+
self.assertTrue(R.is_mount())
549549
if support.can_symlink():
550-
self.assertFalse((P / "linkA").is_mount()) # type: ignore
550+
self.assertFalse((P / "linkA").is_mount())
551551

552552
def test_is_symlink(self):
553553
P = PathPlus(BASE)

tests/test_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def test_from_tuple(tuple_, expects):
175175

176176
def test_too_many_values():
177177
with pytest.raises(TypeError, match=".* takes from 1 to 4 positional arguments but 5 were given"):
178-
Version.from_str("1.2.3.4") # type: ignore
178+
Version.from_str("1.2.3.4")
179179
with pytest.raises(TypeError, match=".* takes from 1 to 4 positional arguments but 5 were given"):
180180
Version(1, 2, 3, 4) # type: ignore
181181
with pytest.raises(TypeError, match=".* takes from 1 to 4 positional arguments but 5 were given"):

0 commit comments

Comments
 (0)