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

Feature: Xcode archive errors #153

Merged
merged 8 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing type hints
  • Loading branch information
priitlatt committed Sep 16, 2021
commit ee84d79721d8af7d8e4cfd2b351c710d9b45576c
3 changes: 2 additions & 1 deletion src/codemagic/models/backwards_file_reader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io
from pathlib import Path
from typing import Iterable
from typing import Union


Expand All @@ -10,7 +11,7 @@ def __init__(self, file_path: Union[Path, str], buffer_size=8192):
self._size = self._file_path.stat().st_size
self._buffer_size = buffer_size

def iter_backwards(self):
def iter_backwards(self) -> Iterable[str]:
"""A generator that returns the lines of a file in reverse order"""
with open(self._file_path) as fd:
current_segment = None
Expand Down
2 changes: 1 addition & 1 deletion src/codemagic/models/xcodebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def _get_failed_commands(self):
return error_lines

def _get_failed_command_logs(self, failed_commands, max_lines) -> Dict[str, List[str]]:
lines_cache = []
lines_cache: List[str] = []
capture_lines = False
logs: Dict[str, List[str]] = {}
for line in self._backwards_log_iterator:
Expand Down