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

DM-41292: Migrate from flake8 to ruff #6

Merged
merged 4 commits into from
Oct 23, 2023
Merged

DM-41292: Migrate from flake8 to ruff #6

merged 4 commits into from
Oct 23, 2023

Conversation

fritzm
Copy link
Member

@fritzm fritzm commented Oct 22, 2023

flake8 is old and busted. ruff is new hotness.

(Way faster, can check many more things, supports auto-fixes, actively and non-obstructively maintained, better pyproject.toml integration, and is the new lint tooling trend for DM.)

Would like to get this in ahead of eac-dev branch re-work; that branch currently has some lint and we might as well address that in relation to the modern linter.

@eacharles eacharles self-requested a review October 23, 2023 02:26
Copy link
Collaborator

@eacharles eacharles left a comment

Choose a reason for hiding this comment

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

Thanks Fritz!!!


def __init__(self, url: str) -> None:
def __init__(self: "CMClient", url: str) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wow, python's butchery of typing reaches epic levels

@@ -21,7 +21,7 @@ def get_productions(self) -> list[models.Production]:
skip += len(results)
return productions

def get_campaigns(self, production: int | None = None) -> list[models.Campaign]:
def get_campaigns(self: "CMClient", production: int | None = None) -> list[models.Campaign]:
Copy link
Collaborator

@eacharles eacharles Oct 23, 2023

Choose a reason for hiding this comment

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

Not sure what Type I am, good thing this string here tells me.

@eacharles eacharles merged commit 18945e3 into main Oct 23, 2023
7 checks passed
@eacharles eacharles deleted the tickets/DM-41292 branch October 23, 2023 02:31
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