Skip to content

Commit

Permalink
Reference format
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Nov 4, 2023
1 parent c373cff commit 3343486
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 19 deletions.
4 changes: 2 additions & 2 deletions tests/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class SingletonTestServer(ub.NiceRepr):
independent IPython session.
CommandLine:
xdoctest -m /home/joncrall/code/ubelt/tests/test_download.py SingletonTestServer
xdoctest -m tests/test_download.py SingletonTestServer
Note:
We rely on python process close mechanisms to clean this server up.
Expand Down Expand Up @@ -463,7 +463,7 @@ def __init__(self):
def find_free_port():
"""
References:
https://stackoverflow.com/questions/1365265/on-localhost-how-do-i-pick-a-free-port-number
.. [SO1365265] https://stackoverflow.com/questions/1365265/on-localhost-how-do-i-pick-a-free-port-number
"""
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:
s.bind(('', 0))
Expand Down
10 changes: 5 additions & 5 deletions tests/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _benchmark():
On 64-bit processors sha512 may be faster than sha256
References:
https://crypto.stackexchange.com/questions/26336/sha512-faster-than-sha256
.. [SE26336] https://crypto.stackexchange.com/questions/26336/sha512-faster-than-sha256
"""
result = ub.AutoOrderedDict()
algos = ['sha1', 'sha256', 'sha512']
Expand Down Expand Up @@ -463,10 +463,10 @@ def test_compatible_hash_bases():
WITH PADDING AND VIA BYTE FORM, NOT INTEGER FORM.
References:
https://stackoverflow.com/questions/43920799/convert-byte-to-base64-and-ascii-in-python
https://github.com/multiformats/multibase
https://stackoverflow.com/questions/6916805/why-does-a-base64-encoded-string-have-an-sign-at-the-end
https://github.com/semente/python-baseconv
.. [SO43920799] https://stackoverflow.com/questions/43920799/convert-byte-to-base64-and-ascii-in-python
.. [MultiBase] https://github.com/multiformats/multibase
.. [SO6916805] https://stackoverflow.com/questions/6916805/why-does-a-base64-encoded-string-have-an-sign-at-the-end
.. [SementeBaseConv] https://github.com/semente/python-baseconv
"""
import pytest
pytest.skip('FIXME THIS ISSUE IS NOT RESOLVE YET.')
Expand Down
13 changes: 6 additions & 7 deletions ubelt/_win32_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
For dealing with symlinks, junctions, and hard-links on windows.
References:
https://stackoverflow.com/questions/18883892/batch-file-windows-cmd-exe-test-if-a-directory-is-a-link-symlink
https://stackoverflow.com/questions/21561850/python-test-for-junction-point-target
http://timgolden.me.uk/python/win32_how_do_i/see_if_two_files_are_the_same_file.html
https://stackoverflow.com/questions/6260149/os-symlink-support-in-windows
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx
https://superuser.com/a/902082/215232
.. [SO18883892] https://stackoverflow.com/questions/18883892/batch-file-windows-cmd-exe-test-if-a-directory-is-a-link-symlink
.. [SO21561850] https://stackoverflow.com/questions/21561850/python-test-for-junction-point-target
.. [WinTwoFilesSame] http://timgolden.me.uk/python/win32_how_do_i/see_if_two_files_are_the_same_file.html
.. [SO6260149] https://stackoverflow.com/questions/6260149/os-symlink-support-in-windows
.. [WinDesktopAA365006] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx
.. [SU902082] https://superuser.com/a/902082/215232
Weird Behavior:
- [ ] In many cases using the win32 API seems to result in privilege errors
Expand Down
2 changes: 1 addition & 1 deletion ubelt/progiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class ProgIter(_TQDMCompat, _BackwardsCompat):
tqdm - https://pypi.python.org/pypi/tqdm
References:
http://datagenetics.com/blog/february12017/index.html
.. [DatagenProgBars] http://datagenetics.com/blog/february12017/index.html
Example:
>>> # doctest: +SKIP
Expand Down
2 changes: 1 addition & 1 deletion ubelt/util_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def _rich_highlight(text, lexer_name): # nocover
Alternative rich-based highlighter
References:
https://github.com/Textualize/rich/discussions/3076
.. [RichDiscuss3076] https://github.com/Textualize/rich/discussions/3076
"""
from rich.syntax import Syntax
from rich.console import Console
Expand Down
2 changes: 1 addition & 1 deletion ubelt/util_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def dict_union(*args):
dictionary union (or any other dictionary set operator).
References:
https://stackoverflow.com/questions/38987/merge-two-dict
.. [SO38987] https://stackoverflow.com/questions/38987/merge-two-dict
SeeAlso:
:func:`collections.ChainMap` - a standard python builtin data structure
Expand Down
2 changes: 1 addition & 1 deletion ubelt/util_indexable.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def throw(self, typ, val=None, tb=None): # type: ignore
StopIteration
References:
https://docs.python.org/3/reference/expressions.html#generator.throw
.. [GeneratorThrow] https://docs.python.org/3/reference/expressions.html#generator.throw
"""
raise StopIteration

Expand Down
2 changes: 1 addition & 1 deletion ubelt/util_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def ensure_unicode(text):
str
References:
[SO_12561063] http://stackoverflow.com/questions/12561063/extract-data-from-file
.. [SO_12561063] http://stackoverflow.com/questions/12561063/extract-data-from-file
Example:
>>> from ubelt.util_str import *
Expand Down

0 comments on commit 3343486

Please sign in to comment.