← 输入框|github.com|刷新
Skip to content

Project: Host Maintenance Policy - #582

Merged
ezilber-akamai merged 17 commits into
devfrom
proj/maintenance-policy
Aug 15, 2025
Merged

ezilber-akamai merged 17 commits into
devfrom
proj/maintenance-policy

Conversation

@ezilber-akamai

Copy link
Copy Markdown
Contributor

📝 Description

This project adds support for the new Host Maintenance Policy features.

✔️ How to Test

make test-unit
make test-int

@ezilber-akamai
ezilber-akamai requested a review from a team as a code owner August 15, 2025 13:27
@ezilber-akamai
ezilber-akamai requested review from yec-akamai and zliang-akamai and removed request for a team August 15, 2025 13:27
@ezilber-akamai ezilber-akamai added the project for new projects in the changelog. label Aug 15, 2025
Comment thread linode_api4/groups/__init__.py Fixed
from .lke import *
from .lke_tier import *
from .longview import *
from .maintenance import *

Check notice

Code scanning / CodeQL

'import *' may pollute namespace

Import pollutes the enclosing namespace, as the imported module [linode_api4.groups.maintenance](1) does not define '__all__'.

Copilot Autofix

AI over 1 year ago

To fix the problem, we should avoid using from .maintenance import * unless the maintenance module defines an __all__ variable that restricts the exported names. Since we cannot edit maintenance.py (as it was not provided), the best fix is to explicitly import only the names that are needed from .maintenance. This requires knowing which names are used from .maintenance in this file or elsewhere in the package. If all names are needed, we should list them explicitly. If only a subset is needed, we should import only those. For this fix, we will replace from .maintenance import * with an explicit import statement listing the required names (using placeholder names if the actual names are unknown).

Edit only line 13 in linode_api4/groups/__init__.py, replacing the import * with explicit imports.

Suggested changeset 1
linode_api4/groups/__init__.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/linode_api4/groups/__init__.py b/linode_api4/groups/__init__.py
--- a/linode_api4/groups/__init__.py
+++ b/linode_api4/groups/__init__.py
@@ -10,7 +10,7 @@
 from .lke import *
 from .lke_tier import *
 from .longview import *
-from .maintenance import *
+from .maintenance import Maintenance, MaintenanceType  # Replace with actual names needed from .maintenance
 from .monitor import *
 from .monitor_api import *
 from .networking import *
EOF
@@ -10,7 +10,7 @@
from .lke import *
from .lke_tier import *
from .longview import *
from .maintenance import *
from .maintenance import Maintenance, MaintenanceType # Replace with actual names needed from .maintenance
from .monitor import *
from .monitor_api import *
from .networking import *
Copilot is powered by AI and may make mistakes. Always verify output.

@lgarber-akamai lgarber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@ezilber-akamai
ezilber-akamai merged commit e18c8f1 into dev Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project for new projects in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants