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

use one line boolean condition with add types #9666

Closed
wants to merge 8 commits into from

Conversation

ArtemIsmagilov
Copy link

simple refactoring

tomchristie
tomchristie previously approved these changes Mar 21, 2025
Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

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

The valid_datetime change is cleaner, okay. We're not generally accepting these types of PRs, tho one part of this is sufficiently obvious and reasonable. (We could put even harder boundaries in place here?)

Some suggested changes here to keep the codebase consistent.

@browniebroke
Copy link
Member

We're not generally accepting these types of PRs, tho one part of this is sufficiently obvious and reasonable. (We could put even harder boundaries in place here?)

I think we need to behave consistently in accepting these kind of PRs: we either accept them or we don't. Yes it's a trivial change but accepting this will IMO open the door to others (e.g. might be harder to decline these #9286 #9285).

I looked up to see if there was a clear technical benefit (from the machine perspective) of making this change and didn't find a compelling argument. Ruff has a page for each rule that usually make a good case for them and according to this one, it seems to be mostly about readability...

With that in mind, I'm -1 for this change, unless we find a way to rephrase the note from our contributing page, which currently reads:

At this point in its lifespan we consider Django REST framework to be feature-complete. We focus on pull requests that track the continued development of Django versions, and generally do not accept new features or code formatting changes.

@tomchristie
Copy link
Member

With that in mind, I'm -1 for this change, unless we find a way to rephrase the note from our contributing page, which currently reads

🫡

@tomchristie
Copy link
Member

Seems reasonable to me, @browniebroke.

Less noise less churn please.

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