Merge pull request #2233 from KPrasch/main

Keep pre commit & push passing
pull/2241/head
K Prasch 2020-09-09 13:27:48 -07:00 committed by GitHub
commit 23ee35c49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 105 additions and 4 deletions

View File

@ -1,3 +1,4 @@
exclude: '^nucypher/blockchain/eth/contract_registry/*'
repos: repos:
- repo: local - repo: local
@ -48,11 +49,11 @@ repos:
hooks: hooks:
# License # License
- id: insert-license - id: insert-license
files: \.py$ files: \.py$ # only target python files, for example - skip contract_registry.json
args: [--license-filepath, '.nucypher-license', --detect-license-in-X-top-lines=16, --comment-style, '"""||"""'] args: [--license-filepath, '.nucypher-license', --detect-license-in-X-top-lines=16, --comment-style, '"""||"""']
# TODO: Will be incrementally introduced # TODO: May be incrementally introduced
# - repo: https://github.com/PyCQA/bandit # - repo: https://github.com/PyCQA/bandit
# rev: '1.6.2' # rev: '1.6.2'
# hooks: # hooks:

View File

@ -1,3 +1,20 @@
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
""" """
This file is part of nucypher. This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify nucypher is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,22 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
# Towncrier silently ignores files that do not match the expected ending. # Towncrier silently ignores files that do not match the expected ending.
# We use this script to ensure we catch these as errors in CI. # We use this script to ensure we catch these as errors in CI.

View File

@ -0,0 +1,16 @@
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""

View File

@ -1,3 +1,20 @@
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
import binascii import binascii
import random import random

View File

@ -195,4 +195,3 @@ class Amonia(Alice):
publish_wrong_payee_address_to_blockchain): publish_wrong_payee_address_to_blockchain):
with patch("nucypher.policy.policies.Policy.enact", self.enact_without_tabulating_responses): with patch("nucypher.policy.policies.Policy.enact", self.enact_without_tabulating_responses):
return super().grant(handpicked_ursulas=ursulas_to_trick_into_working_for_free, *args, **kwargs) return super().grant(handpicked_ursulas=ursulas_to_trick_into_working_for_free, *args, **kwargs)

View File

@ -1,3 +1,20 @@
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
import subprocess import subprocess
import sys import sys
import venv import venv

View File

@ -211,4 +211,4 @@ def test_mass_treasure_map_placement(fleet_of_highperf_mocked_ursulas,
assert len(policy.publishing_mutex.completed) == len(nodes_we_expect_to_have_the_map) assert len(policy.publishing_mutex.completed) == len(nodes_we_expect_to_have_the_map)
nodes_that_got_the_map = sum( nodes_that_got_the_map = sum(
policy.treasure_map.public_id() in u.treasure_maps for u in nodes_we_expect_to_have_the_map) policy.treasure_map.public_id() in u.treasure_maps for u in nodes_we_expect_to_have_the_map)
assert nodes_that_got_the_map == len(nodes_we_expect_to_have_the_map) assert nodes_that_got_the_map == len(nodes_we_expect_to_have_the_map)

File diff suppressed because one or more lines are too long