Skip to content

Commit e443f7b

Browse files
committed
Update ci.yml
1 parent 4acedd0 commit e443f7b

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

Diff for: .github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest, macos-latest]
17-
python: ['3.6', '3.7']
17+
python: ['3.6', '3.7', '3.8', '3.9']
1818
steps:
1919
- uses: actions/checkout@v2
2020
- uses: actions/setup-python@v2
2121
with:
2222
python-version: ${{ matrix.python }}
23-
- run: python -mpip install --upgrade setuptools pip tox virtualenv
23+
- run: python -m pip install --upgrade setuptools pip tox virtualenv
2424
- run: tox -e py
2525
- run: tox -e mypy

Diff for: detect_secrets/core/secrets_collection.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,8 @@ def __eq__(self, other: Any, strict: bool = False) -> bool:
241241
return False
242242

243243
for filename in self.files:
244-
self_mapping = {
245-
(secret.secret_hash, secret.type): secret
246-
for secret in self[filename]
247-
}
248-
other_mapping = {
249-
(secret.secret_hash, secret.type): secret
250-
for secret in other[filename]
251-
}
244+
self_mapping = {secret.secret_hash: secret for secret in self[filename]}
245+
other_mapping = {secret.secret_hash: secret for secret in other[filename]}
252246

253247
# Since PotentialSecret is hashable, we compare their identities through this.
254248
if set(self_mapping.values()) != set(other_mapping.values()):
@@ -258,7 +252,7 @@ def __eq__(self, other: Any, strict: bool = False) -> bool:
258252
continue
259253

260254
for secretA in self_mapping.values():
261-
secretB = other_mapping[(secretA.secret_hash, secretA.type)]
255+
secretB = other_mapping[secretA.secret_hash]
262256

263257
valuesA = vars(secretA)
264258
valuesA.pop('secret_value')

0 commit comments

Comments
 (0)