-
Notifications
You must be signed in to change notification settings - Fork 49
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
build(pre-commit): pre-commit autoupdate by ci #1211
base: dependency-updates
Are you sure you want to change the base?
Conversation
There are a couple of new ruff lint errors: ruff.....................................................................Failed
- hook id: ruff
- exit code: 1
rdmo/core/management/commands/find_spam_users.py:135:15: UP031 Use format specifiers instead of percent format
|
134 | no_total_users = User.objects.all().count()
135 | print('Total no of users: %d' % (no_total_users))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ UP031
136 | potential_spam_users, no_users_having_projects =\
137 | self.find_potential_spam_users(
|
= help: Replace with format specifiers
rdmo/core/management/commands/find_spam_users.py:142:13: UP031 Use format specifiers instead of percent format
|
141 | print(
142 | 'Potential spam users: %d %.2f%% / of which have at least one project %d'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP031
143 | % (
144 | len(potential_spam_users),
|
= help: Replace with format specifiers
rdmo/core/management/commands/find_users.py:102:15: UP031 Use format specifiers instead of percent format
|
100 | def handle(self, *args, **options):
101 | no_total_users = User.objects.all().count()
102 | print('Total no of users: %d' % (no_total_users))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ UP031
103 | found_users = self.find_users(options)
|
= help: Replace with format specifiers
rdmo/core/management/commands/find_users.py:106:13: UP031 Use format specifiers instead of percent format
|
105 | print(
106 | 'Matching the filter: %d %.2f%%'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UP031
107 | % (
108 | len(found_users),
|
= help: Replace with format specifiers
rdmo/core/utils.py:139:17: UP031 Use format specifiers instead of percent format
|
137 | try:
138 | language = settings.LANGUAGES[i][0], settings.LANGUAGES[i][1],\
139 | 'lang%i' % (i + 1)
| ^^^^^^^^ UP031
140 | languages.append(language)
141 | except IndexError:
|
= help: Replace with format specifiers
Found 5 errors. |
The one in |
the f-strings have been there since 3.6 (https://docs.python.org/3/reference/lexical_analysis.html#f-strings), that should not break the |
I know, but fstrings with a dict |
but where is this f-string dict lookup done in this context? It comes as string from the utils function right? |
yes, sorry, I was missleading, I am just worried that we use another feature of fstrings which might not be there in Python 3.9. |
updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.6](astral-sh/ruff-pre-commit@v0.7.2...v0.8.6) - [github.com/pre-commit/mirrors-eslint: v9.14.0 → v9.17.0](pre-commit/mirrors-eslint@v9.14.0...v9.17.0) - [github.com/crate-ci/typos: v1.27.0 → dictgen-v0.3.1](crate-ci/typos@v1.27.0...dictgen-v0.3.1)
ffde451
to
73e77a7
Compare
the bot force pushed the branch, however the fixes for the ruff lint errors can be added by an autofix with ruff I think. |
updates: