From 537b78690881db69f0df1cfed96c30baa32937c2 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 13 Mar 2020 09:18:02 +0100 Subject: [PATCH 1/2] autoblack: actions/checkout@v1 # Use v1, NOT v2 --- .github/workflows/autoblack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autoblack.yml b/.github/workflows/autoblack.yml index 95d2d3d64233..99243f3ec7fc 100644 --- a/.github/workflows/autoblack.yml +++ b/.github/workflows/autoblack.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 # Use v1, NOT v2 - uses: actions/setup-python@v1 - run: pip install black - run: black --check . From 325d087cadc07f2ee513af18648e4cd9fa62417a Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Fri, 13 Mar 2020 08:18:47 +0000 Subject: [PATCH 2/2] fixup! Format Python code with psf/black push --- ciphers/rot13.py | 7 ++++--- sorts/comb_sort.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ciphers/rot13.py b/ciphers/rot13.py index 7a5954f89dd3..6bcb471d6e05 100644 --- a/ciphers/rot13.py +++ b/ciphers/rot13.py @@ -1,4 +1,4 @@ -def dencrypt(s: str, n: int=13): +def dencrypt(s: str, n: int = 13): """ https://en.wikipedia.org/wiki/ROT13 @@ -24,13 +24,14 @@ def main(): s0 = input("Enter message: ") s1 = dencrypt(s0, 13) - print("Encryption:", s1) + print("Encryption:", s1) s2 = dencrypt(s1, 13) - print("Decryption: ", s2) + print("Decryption: ", s2) if __name__ == "__main__": import doctest + doctest.testmod() main() diff --git a/sorts/comb_sort.py b/sorts/comb_sort.py index c36bb8e63748..416fd4552697 100644 --- a/sorts/comb_sort.py +++ b/sorts/comb_sort.py @@ -54,6 +54,7 @@ def comb_sort(data: list) -> list: if __name__ == "__main__": import doctest + doctest.testmod() user_input = input("Enter numbers separated by a comma:\n").strip()