Skip to content

Improve typing 03 25#771

Merged
bashtage merged 5 commits intomainfrom
improve-typing-03-25
Mar 19, 2025
Merged

Improve typing 03 25#771
bashtage merged 5 commits intomainfrom
improve-typing-03-25

Conversation

@bashtage
Copy link
Copy Markdown
Owner

No description provided.

@bashtage bashtage force-pushed the improve-typing-03-25 branch from 6856f96 to 5ba7c17 Compare March 18, 2025 13:36
from arch.utility.exceptions import PerformanceWarning

try:
import numba # noqa

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'numba' is not used.

Copilot Autofix

AI about 1 year ago

To fix the problem, we need to remove the redundant import numba statement. This will eliminate the unnecessary import and make the code cleaner. The from numba import jit statement within the try block will handle the import of numba if it is available, and the HAS_NUMBA variable will be set accordingly.

Suggested changeset 1
arch/compat/numba.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/arch/compat/numba.py b/arch/compat/numba.py
--- a/arch/compat/numba.py
+++ b/arch/compat/numba.py
@@ -7,4 +7,2 @@
 try:
-    import numba  # noqa
-
     HAS_NUMBA = True
EOF
@@ -7,4 +7,2 @@
try:
import numba # noqa

HAS_NUMBA = True
Copilot is powered by AI and may make mistakes. Always verify output.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 98.61111% with 4 lines in your changes missing coverage. Please review.

Project coverage is 99.30%. Comparing base (d62f9d4) to head (d329ff7).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
arch/univariate/volatility.py 96.63% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #771      +/-   ##
==========================================
- Coverage   99.32%   99.30%   -0.03%     
==========================================
  Files          75       75              
  Lines       15722    15769      +47     
  Branches     1284     1293       +9     
==========================================
+ Hits        15616    15659      +43     
- Misses         77       79       +2     
- Partials       29       31       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage bashtage merged commit 4f43914 into main Mar 19, 2025
26 of 29 checks passed
@bashtage bashtage deleted the improve-typing-03-25 branch March 19, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants