Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdakran committed Jan 27, 2022
1 parent 4acedd0 commit e443f7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.6', '3.7']
python: ['3.6', '3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -mpip install --upgrade setuptools pip tox virtualenv
- run: python -m pip install --upgrade setuptools pip tox virtualenv
- run: tox -e py
- run: tox -e mypy
12 changes: 3 additions & 9 deletions detect_secrets/core/secrets_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,8 @@ def __eq__(self, other: Any, strict: bool = False) -> bool:
return False

for filename in self.files:
self_mapping = {
(secret.secret_hash, secret.type): secret
for secret in self[filename]
}
other_mapping = {
(secret.secret_hash, secret.type): secret
for secret in other[filename]
}
self_mapping = {secret.secret_hash: secret for secret in self[filename]}
other_mapping = {secret.secret_hash: secret for secret in other[filename]}

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

for secretA in self_mapping.values():
secretB = other_mapping[(secretA.secret_hash, secretA.type)]
secretB = other_mapping[secretA.secret_hash]

valuesA = vars(secretA)
valuesA.pop('secret_value')
Expand Down

0 comments on commit e443f7b

Please sign in to comment.