GeezerVison is showing github.com — Fix imports for all namespace packages (#2506) · jusing-es/Python@9016fe1
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: ciphers/affine_cipher.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import random |
2 | 2 | import sys |
3 | 3 |
|
4 | | -import cryptomath_module as cryptomath |
| 4 | +from . import cryptomath_module as cryptomath |
5 | 5 |
|
6 | 6 | SYMBOLS = ( |
7 | 7 | r""" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`""" |
|
Collapse file
Copy file name to clipboardExpand all lines: ciphers/elgamal_key_generator.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 | import random |
3 | 3 | import sys |
4 | 4 |
|
5 | | -import cryptomath_module as cryptoMath |
6 | | -import rabin_miller as rabinMiller |
| 5 | +from . import cryptomath_module as cryptoMath |
| 6 | +from . import rabin_miller as rabinMiller |
7 | 7 |
|
8 | 8 | min_primitive_root = 3 |
9 | 9 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: ciphers/rsa_cipher.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import os |
2 | 2 | import sys |
3 | 3 |
|
4 | | -import rsa_key_generator as rkg |
| 4 | +from . import rsa_key_generator as rkg |
5 | 5 |
|
6 | 6 | DEFAULT_BLOCK_SIZE = 128 |
7 | 7 | BYTE_SIZE = 256 |
|
Collapse file
Copy file name to clipboardExpand all lines: ciphers/rsa_key_generator.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 | import random |
3 | 3 | import sys |
4 | 4 |
|
5 | | -import cryptomath_module as cryptoMath |
6 | | -import rabin_miller as rabinMiller |
| 5 | +from . import cryptomath_module as cryptoMath |
| 6 | +from . import rabin_miller as rabinMiller |
7 | 7 |
|
8 | 8 |
|
9 | 9 | def main(): |
|
Collapse file
Copy file name to clipboardExpand all lines: ciphers/transposition_cipher_encrypt_decrypt_file.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 | import sys |
3 | 3 | import time |
4 | 4 |
|
5 | | -import transposition_cipher as transCipher |
| 5 | +from . import transposition_cipher as transCipher |
6 | 6 |
|
7 | 7 |
|
8 | 8 | def main(): |
|
Collapse file
Copy file name to clipboardExpand all lines: data_structures/hashing/double_hash.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | #!/usr/bin/env python3 |
2 | | -from hash_table import HashTable |
3 | | -from number_theory.prime_numbers import check_prime, next_prime |
| 2 | +from .hash_table import HashTable |
| 3 | +from .number_theory.prime_numbers import check_prime, next_prime |
4 | 4 |
|
5 | 5 |
|
6 | 6 | class DoubleHash(HashTable): |
|
Collapse file
Copy file name to clipboardExpand all lines: data_structures/hashing/hash_table.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | #!/usr/bin/env python3 |
2 | | -from number_theory.prime_numbers import next_prime |
| 2 | +from .number_theory.prime_numbers import next_prime |
3 | 3 |
|
4 | 4 |
|
5 | 5 | class HashTable: |
|
Collapse file
Copy file name to clipboardExpand all lines: data_structures/hashing/hash_table_with_linked_list.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | from collections import deque |
2 | 2 |
|
3 | | -from hash_table import HashTable |
| 3 | +from .hash_table import HashTable |
4 | 4 |
|
5 | 5 |
|
6 | 6 | class HashTableWithLinkedList(HashTable): |
|
Collapse file
Copy file name to clipboardExpand all lines: data_structures/hashing/quadratic_probing.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | #!/usr/bin/env python3 |
2 | 2 |
|
3 | | -from hash_table import HashTable |
| 3 | +from .hash_table import HashTable |
4 | 4 |
|
5 | 5 |
|
6 | 6 | class QuadraticProbing(HashTable): |
|
Collapse file
Copy file name to clipboardExpand all lines: data_structures/linked_list/deque_doubly.py +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -112,7 +112,7 @@ def remove_first(self): |
112 | 112 | ... |
113 | 113 | IndexError: remove_first from empty list |
114 | 114 | >>> d.add_first('A') # doctest: +ELLIPSIS |
115 | | - <linked_list.deque_doubly.LinkedDeque object at ... |
| 115 | + <data_structures.linked_list.deque_doubly.LinkedDeque object at ... |
116 | 116 | >>> d.remove_first() |
117 | 117 | 'A' |
118 | 118 | >>> d.is_empty() |
@@ -132,7 +132,7 @@ def remove_last(self): |
132 | 132 | ... |
133 | 133 | IndexError: remove_first from empty list |
134 | 134 | >>> d.add_first('A') # doctest: +ELLIPSIS |
135 | | - <linked_list.deque_doubly.LinkedDeque object at ... |
| 135 | + <data_structures.linked_list.deque_doubly.LinkedDeque object at ... |
136 | 136 | >>> d.remove_last() |
137 | 137 | 'A' |
138 | 138 | >>> d.is_empty() |
|