Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit c193d32

Browse files
committed
remove metprint
1 parent fd68012 commit c193d32

File tree

7 files changed

+21
-42
lines changed

7 files changed

+21
-42
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1+
requirements_optional.txt
12

2-
README.rst
3-
4-
# DepHell stuff
53
poetry.lock
64

75
# Byte-compiled / optimized / DLL files

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
All major and minor version changes will be documented in this file. Details of
44
patch-level version changes can be found in [commit messages](../../commits/master).
55

6+
## 2022.0.1 - 2022/04/06
7+
8+
- Remove metprint
9+
- Update deps
10+
611
## 2022 - 2022/01/27
712

813
- Update deps
@@ -41,10 +46,6 @@ patch-level version changes can be found in [commit messages](../../commits/mast
4146

4247
## 2020.0.2 - 2020/10/08
4348

44-
- `metprint` is now optional
45-
46-
## 2020.0.1 - 2020/10/08
47-
4849
- Use `metprint` if available
4950
- Bugfixes
5051
- Improvements - can use the main functionality if using as a module

checkrequirements/__init__.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
import requirements
1313
from requirements.requirement import Requirement
1414

15-
try:
16-
from metprint import LAZY_PRINT, LogType
17-
except ModuleNotFoundError:
18-
LAZY_PRINT = None
19-
2015
stdout.reconfigure(encoding="utf-8")
2116

2217

@@ -227,22 +222,14 @@ def cli():
227222
args.requirements_file if args.requirements_file else "requirements.txt"
228223
)
229224
if len(reqsDict) == 0:
230-
_ = (
231-
print("/ WARN: No requirements")
232-
if LAZY_PRINT is None
233-
else LAZY_PRINT("No requirements", LogType.WARNING)
234-
)
225+
print("/ WARN: No requirements")
235226
incompat = False
236227
for req in reqsDict:
237228
name = req["name"]
238229
if req["compatible"]:
239-
_ = (
240-
print(f"+ OK: {name}")
241-
if LAZY_PRINT is None
242-
else LAZY_PRINT(name, LogType.SUCCESS)
243-
)
230+
print(f"+ OK: {name}")
244231
else:
245-
_ = print(f"+ ERROR: {name}") if LAZY_PRINT is None else LAZY_PRINT(name, LogType.ERROR)
232+
print(f"+ ERROR: {name}")
246233
incompat = True
247234
if incompat and args.zero:
248235
sysexit(1)

documentation/reference/checkrequirements/index.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Check that your requirements.txt is up to date with the most recent packageversi
1919

2020
## Dependency
2121

22-
[[find in source code]](../../../checkrequirements/__init__.py#L30)
22+
[[find in source code]](../../../checkrequirements/__init__.py#L25)
2323

2424
```python
2525
class Dependency(typing.TypedDict):
@@ -29,7 +29,7 @@ Dependency type.
2929

3030
## UpdateCompatible
3131

32-
[[find in source code]](../../../checkrequirements/__init__.py#L23)
32+
[[find in source code]](../../../checkrequirements/__init__.py#L18)
3333

3434
```python
3535
class UpdateCompatible(typing.TypedDict):
@@ -39,7 +39,7 @@ UpdateCompatible type.
3939

4040
## checkRequirements
4141

42-
[[find in source code]](../../../checkrequirements/__init__.py#L195)
42+
[[find in source code]](../../../checkrequirements/__init__.py#L190)
4343

4444
```python
4545
def checkRequirements(requirementsFile: str) -> list[Dependency]:
@@ -65,7 +65,7 @@ specs (from requirements_parser), ver (most recent version), compatible
6565

6666
## cli
6767

68-
[[find in source code]](../../../checkrequirements/__init__.py#L216)
68+
[[find in source code]](../../../checkrequirements/__init__.py#L211)
6969

7070
```python
7171
def cli():
@@ -75,7 +75,7 @@ CLI entry point.
7575

7676
## partCmp
7777

78-
[[find in source code]](../../../checkrequirements/__init__.py#L67)
78+
[[find in source code]](../../../checkrequirements/__init__.py#L62)
7979

8080
```python
8181
def partCmp(verA: str, verB: str) -> int:
@@ -94,7 +94,7 @@ Compare parts of a semver.
9494

9595
## semCmp
9696

97-
[[find in source code]](../../../checkrequirements/__init__.py#L154)
97+
[[find in source code]](../../../checkrequirements/__init__.py#L149)
9898

9999
```python
100100
def semCmp(versionA: str, versionB: str, sign: str) -> bool:
@@ -118,7 +118,7 @@ Compare two semvers of any length. e.g. 1.1 and 2.2.2.
118118

119119
## semPad
120120

121-
[[find in source code]](../../../checkrequirements/__init__.py#L51)
121+
[[find in source code]](../../../checkrequirements/__init__.py#L46)
122122

123123
```python
124124
def semPad(ver: list[str], length: int) -> list[str]:
@@ -137,7 +137,7 @@ Pad a semver list to the required size. e.g. ["1", "0"] to ["1", "0", "0"].
137137

138138
## semver
139139

140-
[[find in source code]](../../../checkrequirements/__init__.py#L39)
140+
[[find in source code]](../../../checkrequirements/__init__.py#L34)
141141

142142
```python
143143
def semver(version: str) -> list[str]:
@@ -155,7 +155,7 @@ Convert a semver/ python-ver string to a list in the form major, minor patch
155155

156156
## updateCompatible
157157

158-
[[find in source code]](../../../checkrequirements/__init__.py#L174)
158+
[[find in source code]](../../../checkrequirements/__init__.py#L169)
159159

160160
```python
161161
def updateCompatible(req: Requirement) -> UpdateCompatible:

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "checkrequirements"
3-
version = "2022"
3+
version = "2022.0.1"
44
license = "mit"
55
description = "Check that your requirements.txt is up to date with the most recent package versions"
66
authors = ["FredHappyface"]
@@ -28,13 +28,9 @@ checkrequirements = 'checkrequirements:cli'
2828

2929
[tool.poetry.dependencies]
3030
python = "^3.7"
31-
requests = "<3,>=2.26.0"
32-
metprint = {version = "<2023,>=2021", optional = true}
31+
requests = "<3,>=2.27.1"
3332
requirements-parser = "<2,>=0.5.0"
3433

35-
[tool.poetry.extras]
36-
full = ["metprint"]
37-
3834
[tool.poetry.dev-dependencies]
3935
pytest = "^6.2.5"
4036

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
requests<3,>=2.26.0
1+
requests<3,>=2.27.1
22
requirements-parser<2,>=0.5.0

requirements_optional.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)