Skip to content

conf_regen: nginx: Remove file left by the bookworm migration. #2104

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Salamandar
Copy link
Contributor

This file was tampering with the logrotate config of nginx. See YunoHost/issues#2549

The problem

...

Solution

...

PR Status

...

How to test

...

@Salamandar Salamandar force-pushed the cleanup_policy_rc branch from dde998e to cac1fc5 Compare May 9, 2025 17:30
@@ -857,7 +857,9 @@
raise NotImplementedError


class AtaDisk(Disk, AtaController): ...
class AtaDisk(Disk, AtaController):
...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Copilot Autofix

AI about 1 month ago

To fix the issue, we need to determine the intended purpose of the AtaDisk class. If it is meant to be a concrete class, the ellipsis should be removed, and the class should be left empty (if no additional functionality is required). If the class is meant to be abstract, we should use the abc module to define it as an abstract class explicitly. For this fix, we will assume the class is concrete and remove the ellipsis.


Suggested changeset 1
src/utils/udisks2_interfaces.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/src/utils/udisks2_interfaces.py b/src/utils/udisks2_interfaces.py
--- a/src/utils/udisks2_interfaces.py
+++ b/src/utils/udisks2_interfaces.py
@@ -860,3 +860,3 @@
 class AtaDisk(Disk, AtaController):
-    ...
+    pass
 
EOF
@@ -860,3 +860,3 @@
class AtaDisk(Disk, AtaController):
...
pass

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


class NvmeDisk(Disk, NVMeController): ...
class NvmeDisk(Disk, NVMeController):
...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Copilot Autofix

AI about 1 month ago

To fix the issue, we need to clarify the purpose of the NvmeDisk class. If it is meant to be an abstract class, we should explicitly declare it as such using the ABC module from Python's abc library. If it is meant to be a concrete class, we should implement its functionality or provide a meaningful docstring to explain its purpose.

In this case, we will assume that NvmeDisk is intended to be an abstract class, as it inherits from Disk and NVMeController, which likely define abstract methods. We will:

  1. Import the ABC and abstractmethod decorators from the abc module.
  2. Mark the NvmeDisk class as inheriting from ABC.
  3. Add a meaningful docstring to indicate that this class is an abstract base class for NVMe disks.

Suggested changeset 1
src/utils/udisks2_interfaces.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/src/utils/udisks2_interfaces.py b/src/utils/udisks2_interfaces.py
--- a/src/utils/udisks2_interfaces.py
+++ b/src/utils/udisks2_interfaces.py
@@ -21,2 +21,3 @@
 from typing import TYPE_CHECKING
+from abc import ABC
 from unittest.mock import patch
@@ -863,3 +864,6 @@
 
-class NvmeDisk(Disk, NVMeController):
+class NvmeDisk(Disk, NVMeController, ABC):
+    """
+    Abstract base class for NVMe disks.
+    """
     ...
EOF
@@ -21,2 +21,3 @@
from typing import TYPE_CHECKING
from abc import ABC
from unittest.mock import patch
@@ -863,3 +864,6 @@

class NvmeDisk(Disk, NVMeController):
class NvmeDisk(Disk, NVMeController, ABC):
"""
Abstract base class for NVMe disks.
"""
...
Copilot is powered by AI and may make mistakes. Always verify output.
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