GithubHelp home page GithubHelp logo

Comments (3)

fpgmaas avatar fpgmaas commented on July 20, 2024

To add, from here:

Currently, deptry contains some potentially confusing behavior. When python-dotenv is in the dependencies, but not installed (so it has no metadata), with the following configuration:

[tool.deptry.package_module_name_map]
python-dotenv = [
    "dotenv",
]

a warning is still shown:

Warning: Package 'python-dotenv' not found in current environment. Assuming its corresponding module name is 'python_dotenv'.

I think this is now undesired behavior? As a user I would expect that, since I manually specified which module I want the dependency to map to, I do not expect to see a warning, since I already specified how I want this package to be dealt with.

from deptry.

akeeman avatar akeeman commented on July 20, 2024

Note that the warning is actually not necessarily correct. The Assuming its corresponding module name is 'python_dotenv' part is not a consequence of not finding the metadata. It 's a consequence of (always) adding the translation to the top level module name set.

Whether or not to add the translated package name should be discussed in #335.

Given that, I think the warning message could be improved by removing the part mentioned above.

Furthermore, as property found is currently unused, you may decide to remove it, eliminating the metadata lookup when pre-configured top level module names are set for a package.

from deptry.

akeeman avatar akeeman commented on July 20, 2024

I've added #337 as an example solution.

from deptry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.