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

TYP: Typing improvements #637

Merged
merged 1 commit into from
Mar 22, 2025
Merged

TYP: Typing improvements #637

merged 1 commit into from
Mar 22, 2025

Conversation

bashtage
Copy link
Owner

No description provided.

@@ -538,7 +544,7 @@
group: Literal["entity", "time", "both"],
weights: PanelData | None,
return_panel: Literal[False],
) -> linearmodels.typing.data.Float64Array: ... # noqa: E704
) -> linearmodels.typing.data.Float64Array: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Copilot Autofix

AI 18 days ago

To fix the problem, we need to remove the ellipsis (...) from the function overload definition. The ellipsis is not serving any purpose and its removal will not affect the existing functionality of the code. The function overload should be correctly defined without unnecessary placeholders.

Suggested changeset 1
linearmodels/panel/data.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/linearmodels/panel/data.py b/linearmodels/panel/data.py
--- a/linearmodels/panel/data.py
+++ b/linearmodels/panel/data.py
@@ -545,4 +545,4 @@
         weights: PanelData | None,
-        return_panel: Literal[False],
-    ) -> linearmodels.typing.data.Float64Array: ...
+        return_panel: Literal[False]
+    ) -> linearmodels.typing.data.Float64Array:
 
EOF
@@ -545,4 +545,4 @@
weights: PanelData | None,
return_panel: Literal[False],
) -> linearmodels.typing.data.Float64Array: ...
return_panel: Literal[False]
) -> linearmodels.typing.data.Float64Array:

Copilot is powered by AI and may make mistakes. Always verify output.
Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.59%. Comparing base (19b01ac) to head (2510a50).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #637   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files          99       99           
  Lines       17290    17293    +3     
  Branches     1443     1443           
=======================================
+ Hits        17220    17223    +3     
  Misses         26       26           
  Partials       44       44           

☔ 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 775ce62 into main Mar 22, 2025
26 of 27 checks passed
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.

1 participant