Skip to content
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

398 ignore flag #402

Merged
merged 14 commits into from
Jun 18, 2023
Merged

398 ignore flag #402

merged 14 commits into from
Jun 18, 2023

Conversation

fpgmaas
Copy link
Owner

@fpgmaas fpgmaas commented May 15, 2023

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Note

Probably best to update this MR after we decide on #404 and when #401 has been merged.

Description of changes

This PR introduces the following two CLI arguments:

  • ignore
  • per-rule-ignores

It supersedes the following flags, which should be deprecated in the future:

  • ignore-unused
  • ignore-misplaced-dev
  • ignore-missing
  • ignore-transitive
  • skip-unused
  • skip-misplaced-dev
  • skip-missing
  • skip-transitive

Example use in pyproject.toml:

[tool.deptry]
ignore = ["DEP003", "DEP004"]

[tool.deptry.per_rule_ignores]
DEP001 = ["matplotlib"]
DEP002 = ["pandas", "numpy"]

example use in cli:

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

Todo:

  • Add ignore flag.
  • Add per-check-ignore flag.
  • Write unit tests for the deprecation.
  • Fix typing
  • Update the documentation.

@fpgmaas fpgmaas force-pushed the 398-ignore-flag branch from 5f53bee to 5594e66 Compare May 15, 2023 16:18
@fpgmaas fpgmaas marked this pull request as draft May 15, 2023 16:18
@fpgmaas fpgmaas linked an issue May 15, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #402 (1217f1e) into main (11aabee) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #402   +/-   ##
=====================================
  Coverage   96.1%   96.2%           
=====================================
  Files         37      38    +1     
  Lines       1070    1081   +11     
  Branches     215     220    +5     
=====================================
+ Hits        1029    1040   +11     
  Misses        25      25           
  Partials      16      16           
Impacted Files Coverage Δ
deptry/cli.py 92.5% <100.0%> (+0.5%) ⬆️
deptry/core.py 97.8% <100.0%> (-0.2%) ⬇️
deptry/deprecate/ignore_flags.py 100.0% <100.0%> (ø)
deptry/deprecate/skip_flags.py 100.0% <100.0%> (ø)

@fpgmaas fpgmaas marked this pull request as ready for review May 16, 2023 18:32
@fpgmaas fpgmaas requested a review from mkniewallner May 16, 2023 18:36
deptry/core.py Outdated Show resolved Hide resolved
deptry/deprecate/ignore_flags.py Outdated Show resolved Hide resolved
deptry/deprecate/skip_flags.py Outdated Show resolved Hide resolved
deptry/deprecate/ignore_flags.py Outdated Show resolved Hide resolved
deptry/deprecate/skip_flags.py Outdated Show resolved Hide resolved
docs/rules-violations.md Outdated Show resolved Hide resolved
deptry/cli.py Outdated Show resolved Hide resolved
docs/usage.md Outdated Show resolved Hide resolved
fpgmaas and others added 11 commits June 18, 2023 08:06
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
Co-authored-by: Mathieu Kniewallner <mathieu.kniewallner@gmail.com>
@fpgmaas fpgmaas merged commit e29c29a into main Jun 18, 2023
@fpgmaas fpgmaas deleted the 398-ignore-flag branch June 18, 2023 06:26
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.

Replace --ignore-* flags with select (and optionally ignore.)
2 participants