Skip to content

misc: Configure and run deptry#2859

Merged
adamantike merged 1 commit intomasterfrom
misc/run-deptry
Jan 3, 2026
Merged

misc: Configure and run deptry#2859
adamantike merged 1 commit intomasterfrom
misc/run-deptry

Conversation

@adamantike
Copy link
Copy Markdown
Contributor

Description

deptry [1] is a tool to check for unused and missing dependencies in Python projects.

By running it, we already found that pydantic should be added as a direct dependency, that types-* packages can be moved to the dev group, and that user-agents is no longer used and can be removed.

Ideally, a future PR can include the trunk related configuration to run deptry automatically.

[1] https://deptry.com/

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

`deptry` [1] is a tool to check for unused and missing dependencies in
Python projects.

By running it, we already found that `pydantic` should be added as a
direct dependency, that `types-*` packages can be moved to the `dev`
group, and that `user-agents` is no longer used and can be removed.

Ideally, a future PR can include the `trunk` related configuration to
run `deptry` automatically.

[1] https://deptry.com/
@adamantike adamantike requested review from gantoine and zurdi15 January 3, 2026 14:16
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @adamantike, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on refining the project's Python dependency management by introducing and configuring deptry. The primary goal is to ensure that all declared dependencies are actively used and correctly categorized, leading to a cleaner and more maintainable pyproject.toml and uv.lock file. This effort streamlines the project's dependency graph, reducing bloat and potential conflicts.

Highlights

  • Dependency Management: The project now integrates deptry, a tool designed to identify and manage unused or missing dependencies in Python projects. This enhances the accuracy and efficiency of dependency tracking.
  • Dependency Updates: Based on deptry's findings, pydantic has been added as a direct dependency. Several types-* packages (e.g., types-colorama, types-passlib) have been reclassified and moved from direct dependencies to the development dependency group. The user-agents package and its related sub-dependencies (ua-parser, ua-parser-builtins) have been removed as they were found to be unused.
  • Configuration: A new [tool.deptry] section has been added to pyproject.toml. This configuration includes known_first_party modules, pep621_dev_dependency_groups, package_module_name_map for correct module resolution, and per_rule_ignores for DEP002 to handle implicitly used packages (like Gunicorn, OpenTelemetry components, and database drivers).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces deptry for dependency management, which is a valuable addition to maintain project health. The changes correctly add pydantic as a direct dependency, move types-* packages to development dependencies, and remove the unused user-agents package. The configuration for deptry is well-structured. I have provided a couple of suggestions to enhance the configuration for better accuracy and maintainability.

Copy link
Copy Markdown
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

he lives!

@adamantike adamantike merged commit 47c6f4a into master Jan 3, 2026
6 checks passed
@adamantike adamantike deleted the misc/run-deptry branch January 3, 2026 22:33
SaraVieira pushed a commit to SaraVieira/romm that referenced this pull request Jan 29, 2026
`deptry` [1] is a tool to check for unused and missing dependencies in
Python projects.

By running it, we already found that `pydantic` should be added as a
direct dependency, that `types-*` packages can be moved to the `dev`
group, and that `user-agents` is no longer used and can be removed.

Ideally, a future PR can include the `trunk` related configuration to
run `deptry` automatically.

[1] https://deptry.com/
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