-
Notifications
You must be signed in to change notification settings - Fork 68
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
chore: add Ruff #7
Conversation
WalkthroughThe recent updates focus on enhancing the Python development environment by streamlining configuration files and improving code quality practices. Key changes include transitioning to Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
requirements-dev.lock
is excluded by!**/*.lock
Files selected for processing (6)
- .devcontainer/devcontainer.json (1 hunks)
- .vscode/settings.json (1 hunks)
- Makefile (1 hunks)
- dddpy/infrastructure/sqlite/book/init.py (1 hunks)
- main.py (1 hunks)
- pyproject.toml (1 hunks)
Files skipped from review due to trivial changes (1)
- main.py
Additional context used
Ruff
dddpy/infrastructure/sqlite/book/__init__.py
4-4:
.book_repository.BookCommandUseCaseUnitOfWorkImpl
imported but unused; consider removing, adding to__all__
, or using a redundant alias(F401)
5-5:
.book_repository.BookRepositoryImpl
imported but unused; consider removing, adding to__all__
, or using a redundant alias(F401)
Additional comments not posted (11)
dddpy/infrastructure/sqlite/book/__init__.py (1)
3-6
: LGTM! But verify the usage of imported entities.The reformatting changes improve readability and maintain consistency. However, static analysis tools indicate that
BookCommandUseCaseUnitOfWorkImpl
andBookRepositoryImpl
are imported but unused. Verify if these imports are necessary. If not, consider removing them or adding them to__all__
.Tools
Ruff
4-4:
.book_repository.BookCommandUseCaseUnitOfWorkImpl
imported but unused; consider removing, adding to__all__
, or using a redundant alias(F401)
5-5:
.book_repository.BookRepositoryImpl
imported but unused; consider removing, adding to__all__
, or using a redundant alias(F401)
Makefile (3)
7-7
: LGTM! Simplified and modernized build process.The
sync
target simplifies the installation process by only including the$(RYE) sync
command. This aligns with modern dependency management practices.
12-12
: LGTM! Ensure the test target works correctly.The
test
target now calls thesync
command before executing tests withpytest
. This ensures dependencies are synchronized before running tests.
14-15
: LGTM! Streamlined formatting withruff
.The
format
target now usesruff
for formatting, replacingisort
andblack
. This change simplifies the formatting process..vscode/settings.json (1)
10-11
: LGTM! Optimized development environment.The changes reflect a strategic update to the development environment by removing Nose tests, changing the default formatter to
ruff
, and enabling format on save. These changes enhance testing and formatting practices.pyproject.toml (4)
25-25
: Addition ofruff
as a development dependency.The addition of
ruff
as a linter is appropriate and aligns with the shift fromblack
toruff
.
34-38
: Configuration forruff
linter.The
ruff
configuration sets the line length and indentation width, which are standard settings. The target Python version is also specified.
40-45
: Linting rules configuration.The
select
andignore
rules are well-defined, focusing on specific error codes. Thefixable
andunfixable
rules are also appropriately set.
47-61
: Formatting rules configuration.The formatting rules align with
black
's standards, ensuring consistency in code style. The settings for quote style, dummy variables, indentation, trailing commas, and line endings are well-chosen..devcontainer/devcontainer.json (2)
14-14
: Type checking mode configuration.Setting the type checking mode to "basic" is a reasonable default for most projects.
15-21
: Configuration forruff
as the default formatter and code actions on save.These settings ensure that
ruff
is used for formatting and organizing imports, and that formatting is applied automatically on save. This promotes a consistent code style and reduces manual tasks.
Summary by CodeRabbit
New Features
ruff
for code linting and formatting, replacing previous tools.Bug Fixes
nosetests
configuration to streamline testing settings.Chores