Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 252df0a

Browse filesBrowse files
authored
fix(mypy): Fix files in scripts/ (TheAlgorithms#4320)
1 parent 531d2d6 commit 252df0a
Copy full SHA for 252df0a

3 files changed

+4-4Lines changed: 4 additions & 4 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎mypy.ini‎

Copy file name to clipboardExpand all lines: mypy.ini
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
ignore_missing_imports = True
33

44
; FIXME: #4052 fix mypy errors in the exclude directories and remove them below
5-
exclude = (data_structures|dynamic_programming|graphs|maths|matrix|other|project_euler|scripts|searches|strings*)/$
5+
exclude = (data_structures|dynamic_programming|graphs|maths|matrix|other|project_euler|searches|strings*)/$
Collapse file

‎scripts/validate_filenames.py‎

Copy file name to clipboardExpand all lines: scripts/validate_filenames.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
try:
55
from .build_directory_md import good_file_paths
66
except ImportError:
7-
from build_directory_md import good_file_paths
7+
from build_directory_md import good_file_paths # type: ignore
88

99
filepaths = list(good_file_paths())
1010
assert filepaths, "good_file_paths() failed!"
Collapse file

‎scripts/validate_solutions.py‎

Copy file name to clipboardExpand all lines: scripts/validate_solutions.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def convert_path_to_module(file_path: pathlib.Path) -> ModuleType:
2222
"""Converts a file path to a Python module"""
2323
spec = importlib.util.spec_from_file_location(file_path.name, str(file_path))
2424
module = importlib.util.module_from_spec(spec)
25-
spec.loader.exec_module(module)
25+
spec.loader.exec_module(module) # type: ignore
2626
return module
2727

2828

@@ -89,5 +89,5 @@ def test_project_euler(solution_path: pathlib.Path) -> None:
8989
problem_number: str = solution_path.parent.name[8:].zfill(3)
9090
expected: str = PROBLEM_ANSWERS[problem_number]
9191
solution_module = convert_path_to_module(solution_path)
92-
answer = str(solution_module.solution())
92+
answer = str(solution_module.solution()) # type: ignore
9393
assert answer == expected, f"Expected {expected} but got {answer}"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.