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

Enable more ruff lints #143

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Enable more ruff lints #143

merged 1 commit into from
Jan 6, 2025

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Jan 5, 2025

No description provided.

@Mic92 Mic92 changed the title let ruff fix more lints Enable more ruff lints Jan 5, 2025
path.mkdir(parents=True, exist_ok=True)
(path / value).touch()

def delete(self, key: str, value: str) -> None:
if value is None:
Copy link
Member Author

Choose a reason for hiding this comment

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

This can be never none.

@@ -116,7 +119,6 @@ def merge_command(issue_comment: IssueComment, settings: Settings) -> HttpRespon
client.create_issue_reaction(
issue_comment.repo_owner,
issue_comment.repo_name,
issue_comment.issue_number,
Copy link
Member Author

Choose a reason for hiding this comment

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

Unused argument.

@@ -55,7 +55,7 @@ def parse_args() -> Settings:
parser.add_argument(
"--database-folder",
type=str,
default="/tmp",
Copy link
Member Author

Choose a reason for hiding this comment

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

insecure default.

@@ -1,15 +1,19 @@
import logging
from dataclasses import dataclass

from ..database import Database
from ..github.GitHubClient import GithubClient, GithubClientError, get_github_client
Copy link
Member Author

Choose a reason for hiding this comment

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

Module names shouldn't container capital case.

@@ -219,12 +213,7 @@ def test_post_merge_maintainer(
).read_bytes()
},
{
"nixpkgs_merge_bot.nix.nix_utils.nix_eval": (
Copy link
Member Author

Choose a reason for hiding this comment

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

duplicate key

@@ -64,46 +63,46 @@ def headers(self) -> dict[str, str]:
return self.fake_headers


def default_mocks(mocker: MockerFixture) -> dict[str, Any]:
Copy link
Member Author

Choose a reason for hiding this comment

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

unused.

log = logging.getLogger(__name__)


class MergingStrategyTemplate:
class MergingStrategyTemplate(ABC):
Copy link
Member Author

Choose a reason for hiding this comment

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

This wasn't used directly, so made it an abstract class.

@Scriptkiddi Scriptkiddi merged commit 3018e16 into main Jan 6, 2025
3 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.

3 participants