WIP: show meaningful changes with ruff format #314
No reviewers
Labels
No labels
Closed As
Duplicate
Closed As
Fixed
Closed As
Invalid
discussions
easyfix
enhancement
task
ai-review-please
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
pr2jira
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quality/blockerbugs!314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/306-2-ruff-reformat-important-changes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
See pyproject.toml changes
This is a temporary helper branch for #306 and #312
@ -410,0 +420,4 @@action='store_true',default=False,help='Force check for missing blocker bugs after sync',)Argparser definitions are another place where visual compactness is better for human consumption than splitting the values line by line. The original file with its custom wrapping was easier to read and search in.
I don't find this style less easy to read than custom wrapping, tbh. With the custom wrapping you have to look carefully how many arguments there are per line. With this you know there's one per line. This also gives you more space for your help text before you have to deal with wrapping a string across multiple lines...
@ -96,3 +110,2 @@update_data['bugs'] = [{'bugid': bug.bugid,'type': [tp for tp in ACCEPTED_BUGTYPES if getattr(bug, tp)]}{'bugid': bug.bugid, 'type': [tp for tp in ACCEPTED_BUGTYPES if getattr(bug, tp)]}This should probably receive the magic trailing comma for readability.
@ -252,0 +302,4 @@date_submitted=month_old_date,stable_karma=0,karma=-2,)This seems like a clear regression to me. The original file as a nice flow and easy to read and parse with your eyes. Having it condensed is quite important when you want to cover all possible use cases and you need to visually see what is already covered and what it not. Splitting one of these lines arg-by-arg is a downgrade, because it breaks the pattern and prevents all the important info to fit on your screen.
In this case, it's
testdata.py, a module for creating fake DB data. But the same situation will occur intesting/. You also need to specify lots of objects with lots of values, and vertical compactness of often more important in that case then individual arg values (they are often repeated over and over again anyway).well, there's a few options then. If values are 'repeated over and over', that's an opportunity for improvement: could we e.g. use a
functools.partial, or a wrapper foradd_update, so we don't have to keep repeating those values over and over, and thus all the calls fit on one line?@ -49,0 +60,4 @@],'updateid': 'update1_for_bug_3000',})I find these changes painful. What was an a short and readable code, is now very pretty and very long code. But in unit tests, prettiness is not your primary concern. Being able to process (and test) a lot of data is.
I don't really mind these.
This is no longer needed, closing in favor of #312
Pull request closed