Skip to content

Commit

Permalink
🐛 --strip-extras
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin committed Nov 16, 2023
1 parent e305e4d commit 17b995a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hatch-pip-compile

[hatch] plugin to use [pip-compile] to manage project dependencies
[hatch] plugin to use [pip-compile] to manage project dependencies and lockfiles.

[![PyPI](https://img.shields.io/pypi/v/hatch-pip-compile?color=blue&label=🔨%20hatch-pip-compile)](https://github.com/juftin/hatch-pip-compile)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-pip-compile)](https://pypi.python.org/pypi/hatch-pip-compile/)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hatch-pip-compile

[hatch] plugin to use [pip-compile] to manage project dependencies
[hatch] plugin to use [pip-compile] to manage project dependencies and lockfiles.

[![PyPI](https://img.shields.io/pypi/v/hatch-pip-compile?color=blue&label=🔨%20hatch-pip-compile)](https://github.com/juftin/hatch-pip-compile)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-pip-compile)](https://pypi.python.org/pypi/hatch-pip-compile/)
Expand Down
8 changes: 3 additions & 5 deletions hatch_pip_compile/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
hatch-pip-compile plugin
"""

from __future__ import annotations

import pathlib
import re
import tempfile
from textwrap import dedent
from typing import Any, List
from typing import Any, Dict, List

from hatch.env.virtual import VirtualEnvironment

Expand All @@ -33,7 +31,7 @@ def __init__(self, *args, **kwargs):
self._piptools_lock_file = self._config_lock_directory / _lock_filename

@staticmethod
def get_option_types() -> dict[str, Any]:
def get_option_types() -> Dict[str, Any]:
"""
Get option types
"""
Expand Down Expand Up @@ -73,7 +71,7 @@ def _pip_compile_command(self, output_file: pathlib.Path, input_file: pathlib.Pa
"--quiet",
(
"--strip-extras"
if self.config.get("pip-compile-strip-extras", False) is True
if self.config.get("pip-compile-strip-extras", True) is True
else "--no-strip-extras"
),
"--header" if self.config.get("pip-compile-header", False) is True else "--no-header",
Expand Down

0 comments on commit 17b995a

Please sign in to comment.