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

Fix import not used and E501 issues #1084

Merged
merged 2 commits into from
Jul 5, 2024
Merged

Conversation

stevenhua0320
Copy link
Contributor

I leave E722 for check, which is do not leave bare except. However, the code structure is like this:
截屏2024-07-05 上午1 16 34

@sbillinge
Copy link
Contributor

For this one, please can you try and run tests and make sure they pass? Let me know here on the PR and when tests pass I can merge.

for the E722, I am not sure how that would fail and raise an exception. I will try and play with it a bit.

@sbillinge
Copy link
Contributor

@stevenhua0320 I think we can just remove that try except clause, so it becomes

            if index:
                task["preamble"] = (
                    f"({task.get('importance')})({task.get('days_to_due')} days): ({task.get('running_index', 0)}) "
                )
            else:
                task["preamble"] = ""

@stevenhua0320
Copy link
Contributor Author

@stevenhua0320 I think we can just remove that try except clause, so it becomes

            if index:
                task["preamble"] = (
                    f"({task.get('importance')})({task.get('days_to_due')} days): ({task.get('running_index', 0)}) "
                )
            else:
                task["preamble"] = ""

yeah, I think the code here should be an if statement, then it could pass. Let me try it and if it works, I would push it.

@sbillinge
Copy link
Contributor

the if statement was already there. I just removed the try/except

@sbillinge
Copy link
Contributor

@stevenhua0320 please confirm that this is passing tests and I can merge it.

@stevenhua0320
Copy link
Contributor Author

Yes, I have verified that it is a passing test.

@sbillinge sbillinge merged commit 2d76379 into regro:main Jul 5, 2024
1 check passed
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