GithubHelp home page GithubHelp logo

Comments (3)

fpgmaas avatar fpgmaas commented on July 19, 2024 1

Great idea, I think this would be very useful! Given #398, it might make sense to implement this similar to ruff as well. ruff has the following flags:

  --ignore <RULE_CODE>
      Comma-separated list of rule codes to disable
  --per-file-ignores <PER_FILE_IGNORES>
      List of mappings from file pattern to code to exclude

In our case, we could have the following flags:

--ignore
--per-rule-ignores
--per-file-ignores

--ignore can be used to ignore a rule (DEP001, DEP002, etc) in the entire codebase. e.g.

deptry . --ignore DEP001,DEP002

--per-rule-ignores can be used to skip certain packages or modules for specific rules, e.g: Ignore matplotlib for DEP002.

deptry . --per-rule-ignores DEP001=matplotlib,DEP002=pandas|numpy

The --per-file-ignores can be used to skip checking for specific rules for specific files. Here, we might want to give functionality to both ignore a rule completely per file, and only ignore it for specific modules/dependencies:

deptry . --per-file-ignores DEP001=path/to/file1.py,DEP002=path/to/file2.py:pandas|numpy

This would ignore DEP001 completely in file1.py, and it would ignore pandas and numpy for DEP002 in file2.py.

Curious for your thoughts on the proposal!

from deptry.

fpgmaas avatar fpgmaas commented on July 19, 2024 1

@kenibrewer sorry, those have not been implemented yet!

from deptry.

kenibrewer avatar kenibrewer commented on July 19, 2024

@fpgmaas I think a good part of this issue was addressed in 0.12.0. Have the in-file
import tomllib # deptry: ignore[DEP001]
style ignores already been added as well or is that still outstanding?

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.