-
Notifications
You must be signed in to change notification settings - Fork 2
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
Evaluating ruff #683
Merged
Merged
Evaluating ruff #683
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
b4645bb
add ruff
helylle 12e9f7a
update deps
helylle 271671f
remove unused imports
helylle 7e44385
remove superfluous import statements
helylle e6adae1
add explicit re-export
helylle 01a3e07
make sure strings are f-strings
helylle 16e96e3
make normal strings of f-strings without placeholders
helylle a9bddd5
ignore rule E741 (names to avoid) for now
helylle 4f39c1a
remove unused variables
helylle fcaf0ce
use 'is' for comparisons with None
helylle 49832f1
avoid comparisons to boolean literals
helylle 2c80cfe
use 'is' for type comparisons
helylle b69e2d7
remove unnecessary trailing comma
helylle ac20eba
remove commented imports
helylle 770b3c2
ruff reformat
helylle 988c8c1
remove double import
helylle 1b65f4c
follow pycodestyle readability, E713
helylle e188757
do not use bare except
helylle 2a0366b
remove old try/except
helylle 68e4888
make sure mocked function applies to test
helylle 4b22ec6
remove import directory from repository migration work
helylle 5a8043a
Merge branch 'main' into ylle_evaluating_ruff
helylle d14a576
use ruff for reformat and add lint rule with ruff check
helylle f83fc2f
clean up imports from linting check
helylle 03a4e50
make reformat
helylle a0a1ebc
test linting in github workflow
helylle b1788ba
updates to vscode settings in devcontainer for ruff
helylle c7425e3
add ruff as isort replacement
helylle 69abb0b
make reformat
helylle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ pytest-cov | |
respx | ||
pip-tools | ||
motor-types | ||
ruff |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Set the maximum line length to 120. | ||
line-length = 120 | ||
target-version = "py310" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
__author__ = "lundberg" | ||
|
||
from eduid.common.clients.scim_client.scim_client import SCIMClient | ||
|
||
__all__ = ['SCIMClient'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
from eduid.graphdb.db import BaseGraphDB, Neo4jDB | ||
|
||
__all__ = [ | ||
'BaseGraphDB', | ||
'Neo4jDB', | ||
] | ||
|
||
__author__ = "lundberg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
from eduid.queue.db.message.db import MessageDB | ||
from eduid.queue.db.message.payload import EduidInviteEmail, EduidSignupEmail | ||
|
||
__all__ = [ | ||
'MessageDB', | ||
'EduidInviteEmail', | ||
'EduidSignupEmail', | ||
] | ||
|
||
__author__ = "lundberg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from datetime import datetime | ||
from typing import Any, Optional | ||
from uuid import UUID | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,8 @@ | |
|
||
from .user import ToUUser | ||
from .userdb import ToUUserDB | ||
|
||
__all__ = [ | ||
"ToUUser", | ||
"ToUUserDB", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
from eduid.userdb.group_management.db import GroupManagementInviteStateDB | ||
from eduid.userdb.group_management.state import GroupInviteState, GroupRole | ||
|
||
__all__ = [ | ||
'GroupManagementInviteStateDB', | ||
'GroupInviteState', | ||
'GroupRole', | ||
] | ||
|
||
__author__ = "lundberg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
from .db import IdPUserDb | ||
from .user import IdPUser | ||
|
||
__all__ = [ | ||
'IdPUser', | ||
'IdPUserDb', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
from eduid.userdb.maccapi.userdb import ManagedAccount, ManagedAccountDB | ||
|
||
__all__ = [ | ||
'ManagedAccount', | ||
'ManagedAccountDB', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
from eduid.userdb.personal_data.db import PersonalDataUserDB | ||
from eduid.userdb.personal_data.user import PersonalDataUser | ||
|
||
__all__ = [ | ||
'PersonalDataUserDB', | ||
'PersonalDataUser', | ||
] | ||
|
||
__author__ = "lundberg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruff wanted to remove e as an unused variable as the f-strings were just strings