Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/syntax-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:

- name: Run Syntax Test
run: |
runInContainer bash -c "pip install --no-cache-dir quantconnect-stubs types-requests==2.32.* types-pytz==2025.2.0.* mypy==1.15.0"
runInContainer python run_syntax_check.py
runInContainer bash -c "pip install --no-cache-dir quantconnect-stubs types-requests==2.32.* types-pytz==2025.2.0.* mypy==1.20.2"
runInContainer python run_syntax_check.py
5 changes: 3 additions & 2 deletions run_syntax_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def should_ignore(line: str, prev_line_ignored: bool) -> bool:
'Module has no attribute "JsonConvert"',
'Too many arguments for "update" of "IndicatorBase"',
'Signature of "update" incompatible with supertype "IndicatorBase"',
'Signature of "update" incompatible with supertype "QuantConnect.Indicators.IndicatorBase"',
'has incompatible type "Symbol"; expected "str"',
# This methods take an indicator and consolidator which might be instances of custom
# indicator/consolidator Python classes that don't inherit from PythonIndicator or IDataConsolidator
Expand All @@ -94,7 +95,7 @@ def should_ignore(line: str, prev_line_ignored: bool) -> bool:

# Ignore accessing indicator properties. Useful for instance when adding indicators of different types
# to a list and then iterating over them, the common type will be IIndicatorWarmUpPeriodProvider
indicator_attributes_match = re.search(r'error: "IIndicatorWarmUpPeriodProvider" has no attribute "([^"]+)"', line)
indicator_attributes_match = re.search(r'error: "IIndicatorWarmUpPeriodProvider" has no attribute "([^"]+)"', line) or re.search(r'error: "Iterable\[IndicatorDataPoint\]" has no attribute "([^"]+)"', line)
if indicator_attributes_match and indicator_attributes_match.group(1) in specific_indicator_attributes:
return True

Expand Down Expand Up @@ -156,4 +157,4 @@ def run_syntax_check(target_file: str):
log(str(result))
success_rate = round((sum(result) / len(result)) * 100, 1)
log(f"SUCCESS RATE {success_rate}% took {time.time() - start_time}s")
exit(0 if success_rate >= 99.3 else 1)
exit(0 if success_rate >= 99.1 else 1)
Loading