Skip to content

Commit 0b358c3

Browse files
committed
remove dict dependency
1 parent ac21348 commit 0b358c3

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ license = "MIT"
1010
[tool.poetry.dependencies]
1111
python = "^3.6"
1212
has-flag = "^0.1.1"
13-
dict = "^2020.12.3"
1413

1514
[tool.poetry.dev-dependencies]
1615
pytest = "^5.2"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{'': ['*']}
99

1010
install_requires = \
11-
['dict>=2020.12.3,<2021.0.0', 'has-flag>=0.1.1,<0.2.0']
11+
['has-flag>=0.1.1,<0.2.0']
1212

1313
setup_kwargs = {
1414
'name': 'supports-color',

supports_color/__init__.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from has_flag import has_flag
44
from os import environ as env
5-
from dict import dict as edict
65
import re
76
import sys
87
import platform
@@ -36,12 +35,12 @@ def translateLevel(level):
3635
if level == 0:
3736
return False
3837

39-
return edict(
40-
level=level,
41-
hasBasic=True,
42-
has256=level >= 2,
43-
has16m=level >= 3
44-
)
38+
return {
39+
'level': level,
40+
'hasBasic': True,
41+
'has256': level >= 2,
42+
'has16m': level >= 3,
43+
}
4544

4645

4746
# function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
@@ -207,7 +206,7 @@ def createSupportsColor(stream, **options):
207206
# stderr: createSupportsColor({isTTY: tty.isatty(2)})
208207
# }
209208

210-
supportsColor = edict(
211-
stdout=createSupportsColor(sys.stdout),
212-
stderr=createSupportsColor(sys.stderr),
213-
)
209+
supportsColor = {
210+
'stdout': createSupportsColor(sys.stdout),
211+
'stderr': createSupportsColor(sys.stderr),
212+
}

0 commit comments

Comments
 (0)