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

Respect __str__ definitions from super classes #9338

Merged
merged 1 commit into from
Dec 31, 2023
Merged

Conversation

charliermarsh
Copy link
Member

Closes #9242.

@charliermarsh charliermarsh merged commit 1f9353f into main Dec 31, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/dj branch December 31, 2023 22:25
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+18 -22 violations, +0 -0 fixes in 1 projects; 40 projects unchanged)

zulip/zulip (+18 -22 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --no-preview --select ALL

- analytics/models.py:42:16: DJ001 Avoid using `null=True` on string-based fields such as CharField
+ analytics/models.py:42:16: DJ001 Avoid using `null=True` on string-based fields such as `CharField`
- corporate/models.py:27:26: DJ001 Avoid using `null=True` on string-based fields such as CharField
+ corporate/models.py:27:26: DJ001 Avoid using `null=True` on string-based fields such as `CharField`
- corporate/models.py:421:19: DJ001 Avoid using `null=True` on string-based fields such as URLField
+ corporate/models.py:421:19: DJ001 Avoid using `null=True` on string-based fields such as `URLField`
- zerver/models/custom_profile_fields.py:186:22: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/custom_profile_fields.py:186:22: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/messages.py:114:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:123:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:57:24: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/messages.py:57:24: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/messages.py:688:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:709:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:73:20: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/messages.py:73:20: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/prereg_users.py:73:17: DJ001 Avoid using `null=True` on string-based fields such as CharField
+ zerver/models/prereg_users.py:73:17: DJ001 Avoid using `null=True` on string-based fields such as `CharField`
- zerver/models/push_notifications.py:32:18: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/push_notifications.py:32:18: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/realm_emoji.py:48:17: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/realm_emoji.py:48:17: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/realms.py:138:28: DJ001 Avoid using `null=True` on string-based fields such as URLField
+ zerver/models/realms.py:138:28: DJ001 Avoid using `null=True` on string-based fields such as `URLField`
- zerver/models/realms.py:534:24: DJ001 Avoid using `null=True` on string-based fields such as URLField
+ zerver/models/realms.py:534:24: DJ001 Avoid using `null=True` on string-based fields such as `URLField`
- zerver/models/scheduled_jobs.py:162:23: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/scheduled_jobs.py:162:23: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/scheduled_jobs.py:42:15: DJ001 Avoid using `null=True` on string-based fields such as EmailField
+ zerver/models/scheduled_jobs.py:42:15: DJ001 Avoid using `null=True` on string-based fields such as `EmailField`
... 11 additional changes omitted for rule DJ001

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
DJ001 36 18 18 0 0
DJ008 4 0 4 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+18 -22 violations, +0 -0 fixes in 1 projects; 40 projects unchanged)

zulip/zulip (+18 -22 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

- analytics/models.py:42:16: DJ001 Avoid using `null=True` on string-based fields such as CharField
+ analytics/models.py:42:16: DJ001 Avoid using `null=True` on string-based fields such as `CharField`
- corporate/models.py:27:26: DJ001 Avoid using `null=True` on string-based fields such as CharField
+ corporate/models.py:27:26: DJ001 Avoid using `null=True` on string-based fields such as `CharField`
- corporate/models.py:421:19: DJ001 Avoid using `null=True` on string-based fields such as URLField
+ corporate/models.py:421:19: DJ001 Avoid using `null=True` on string-based fields such as `URLField`
- zerver/models/custom_profile_fields.py:186:22: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/custom_profile_fields.py:186:22: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/messages.py:114:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:123:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:57:24: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/messages.py:57:24: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/messages.py:688:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:709:7: DJ008 Model does not define `__str__` method
- zerver/models/messages.py:73:20: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/messages.py:73:20: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/prereg_users.py:73:17: DJ001 Avoid using `null=True` on string-based fields such as CharField
+ zerver/models/prereg_users.py:73:17: DJ001 Avoid using `null=True` on string-based fields such as `CharField`
- zerver/models/push_notifications.py:32:18: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/push_notifications.py:32:18: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/realm_emoji.py:48:17: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/realm_emoji.py:48:17: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/realms.py:138:28: DJ001 Avoid using `null=True` on string-based fields such as URLField
+ zerver/models/realms.py:138:28: DJ001 Avoid using `null=True` on string-based fields such as `URLField`
- zerver/models/realms.py:534:24: DJ001 Avoid using `null=True` on string-based fields such as URLField
+ zerver/models/realms.py:534:24: DJ001 Avoid using `null=True` on string-based fields such as `URLField`
- zerver/models/scheduled_jobs.py:162:23: DJ001 Avoid using `null=True` on string-based fields such as TextField
+ zerver/models/scheduled_jobs.py:162:23: DJ001 Avoid using `null=True` on string-based fields such as `TextField`
- zerver/models/scheduled_jobs.py:42:15: DJ001 Avoid using `null=True` on string-based fields such as EmailField
+ zerver/models/scheduled_jobs.py:42:15: DJ001 Avoid using `null=True` on string-based fields such as `EmailField`
... 11 additional changes omitted for rule DJ001

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
DJ001 36 18 18 0 0
DJ008 4 0 4 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After update to 0.1.9 "DJ008 Model does not define __str__ method" appears
1 participant