diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f588f22..f2b42a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: - dependencies: python python3-build twine task: make -f Makefile package runs-on: ubuntu-latest - container: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT + container: fedora:43 # CURRENT DEVELOPMENT ENVIRONMENT steps: - uses: actions/checkout@v6 with: @@ -62,7 +62,7 @@ jobs: python3-justbases task: PYTHONPATH=./src make -f Makefile test runs-on: ubuntu-latest - container: fedora:42 # CURRENT DEVELOPMENT ENVIRONMENT + container: fedora:43 # CURRENT DEVELOPMENT ENVIRONMENT steps: - name: Install python3.12 run: > diff --git a/src/justbytes/__init__.py b/src/justbytes/__init__.py index f87ea3b..7f44280 100644 --- a/src/justbytes/__init__.py +++ b/src/justbytes/__init__.py @@ -15,67 +15,67 @@ # # Red Hat Author(s): Anne Mulhern -""" The public interface of the justbytes package. - - Contents: - - * Unit constants in SI and binary units - - Universal: - * B - - - SI: - * KB - * MB - * GB - * TB - * PB - * EB - * ZB - * YB - - - Binary: - * KiB - * MiB - * GiB - * TiB - * PiB - * EiB - * ZiB - * YiB - - - UNITS: :func:`._constants.UNITS` - - * Rounding constants, with meaning as for the Python decimal module: - - ROUND_DOWN - - ROUND_HALF_DOWN - - ROUND_HALF_UP - - ROUND_UP - - - ROUNDING_METHODS - - * Configuration classes: - - StrConfig: :class:`._config.StrConfig` - - * Exception classes: - - RangeError: :class:`._errors.RangeError` - - RangeValueError: :class:`._errors.RangeValueError` - - * Range classes: - - Range: :class:`._size.Range` - - AI: :class:`._sizes.AI` - - All parts of the public interface of justbytes must be imported directly - from the top-level justbytes module, as:: - - from justbytes import Range - from justbytes import KiB - from justbytes import RangeError - - s = Range(24, KiB) - try: - s + 32 - except RangeError as e: - raise e +"""The public interface of the justbytes package. + +Contents: + +* Unit constants in SI and binary units + - Universal: + * B + + - SI: + * KB + * MB + * GB + * TB + * PB + * EB + * ZB + * YB + + - Binary: + * KiB + * MiB + * GiB + * TiB + * PiB + * EiB + * ZiB + * YiB + + - UNITS: :func:`._constants.UNITS` + +* Rounding constants, with meaning as for the Python decimal module: + - ROUND_DOWN + - ROUND_HALF_DOWN + - ROUND_HALF_UP + - ROUND_UP + + - ROUNDING_METHODS + +* Configuration classes: + - StrConfig: :class:`._config.StrConfig` + +* Exception classes: + - RangeError: :class:`._errors.RangeError` + - RangeValueError: :class:`._errors.RangeValueError` + +* Range classes: + - Range: :class:`._size.Range` + - AI: :class:`._sizes.AI` + +All parts of the public interface of justbytes must be imported directly +from the top-level justbytes module, as:: + + from justbytes import Range + from justbytes import KiB + from justbytes import RangeError + + s = Range(24, KiB) + try: + s + 32 + except RangeError as e: + raise e """ # pylint: disable=invalid-name # pylint: disable=wrong-import-position diff --git a/src/justbytes/_config.py b/src/justbytes/_config.py index e8738a1..9a01860 100644 --- a/src/justbytes/_config.py +++ b/src/justbytes/_config.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Configuration of the justbytes package. """ +"""Configuration of the justbytes package.""" # pylint: disable=invalid-name diff --git a/src/justbytes/_constants.py b/src/justbytes/_constants.py index aaa49c2..a8dec8a 100644 --- a/src/justbytes/_constants.py +++ b/src/justbytes/_constants.py @@ -15,11 +15,11 @@ # # Red Hat Author(s): Anne Mulhern -""" Constants used by the justbytes package. +"""Constants used by the justbytes package. - Categories of constants: - * Rounding methods - * Size units, e.g., Ki, Mi +Categories of constants: + * Rounding methods + * Size units, e.g., Ki, Mi """ # isort: STDLIB diff --git a/src/justbytes/_errors.py b/src/justbytes/_errors.py index f453251..76005b1 100644 --- a/src/justbytes/_errors.py +++ b/src/justbytes/_errors.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Exception types used by the justbytes class. """ +"""Exception types used by the justbytes class.""" # isort: STDLIB import abc diff --git a/src/justbytes/_generators.py b/src/justbytes/_generators.py index 98023f2..5c4147a 100644 --- a/src/justbytes/_generators.py +++ b/src/justbytes/_generators.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Special purpose generators. """ +"""Special purpose generators.""" def takeuntil(pred, seq): diff --git a/src/justbytes/_size.py b/src/justbytes/_size.py index 5a8dc05..2cb0a65 100644 --- a/src/justbytes/_size.py +++ b/src/justbytes/_size.py @@ -15,13 +15,13 @@ # # Red Hat Author(s): Anne Mulhern -""" Range class, for creating instances of Range objects. +"""Range class, for creating instances of Range objects. - Contains a few documented methods and a number of __*__ methods - implementing arithmetic operations. Precise numeric types - such as int and Fraction may also occur in some arithmetic expressions, - but all occurrences of floating point and Decimal numbers in arithmetic - expressions will cause an exception to be raised. +Contains a few documented methods and a number of __*__ methods +implementing arithmetic operations. Precise numeric types +such as int and Fraction may also occur in some arithmetic expressions, +but all occurrences of floating point and Decimal numbers in arithmetic +expressions will cause an exception to be raised. """ # isort: STDLIB diff --git a/src/justbytes/_sizes.py b/src/justbytes/_sizes.py index 9f2ed9b..bf8e9a6 100644 --- a/src/justbytes/_sizes.py +++ b/src/justbytes/_sizes.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Class for methods that do not properly belong in the Range class. """ +"""Class for methods that do not properly belong in the Range class.""" from ._size import Range AI = Range(0) # pragma: no cover diff --git a/src/justbytes/version.py b/src/justbytes/version.py index cb70528..103de19 100644 --- a/src/justbytes/version.py +++ b/src/justbytes/version.py @@ -17,12 +17,12 @@ # Red Hat Author(s): Anne Mulhern """ - justbytes.version - ================= +justbytes.version +================= - Version information. +Version information. - .. moduleauthor:: mulhern +.. moduleauthor:: mulhern """ __version__ = "0.15.2" diff --git a/tests/test_deterministic/test_config.py b/tests/test_deterministic/test_config.py index 858c732..332d385 100644 --- a/tests/test_deterministic/test_config.py +++ b/tests/test_deterministic/test_config.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for configuration classes. """ +"""Test for configuration classes.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_constants.py b/tests/test_deterministic/test_constants.py index b63cdf6..85563f2 100644 --- a/tests/test_deterministic/test_constants.py +++ b/tests/test_deterministic/test_constants.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for constants classes. """ +"""Test for constants classes.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_errors.py b/tests/test_deterministic/test_errors.py index a9859f2..9ef0873 100644 --- a/tests/test_deterministic/test_errors.py +++ b/tests/test_deterministic/test_errors.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for error classes. """ +"""Test for error classes.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_size/test_conversions.py b/tests/test_deterministic/test_size/test_conversions.py index 0d1eecd..e10992e 100644 --- a/tests/test_deterministic/test_size/test_conversions.py +++ b/tests/test_deterministic/test_size/test_conversions.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for operations on Range objects. """ +"""Tests for operations on Range objects.""" # isort: STDLIB import copy diff --git a/tests/test_deterministic/test_size/test_initializer.py b/tests/test_deterministic/test_size/test_initializer.py index d5ef608..daa2ca4 100644 --- a/tests/test_deterministic/test_size/test_initializer.py +++ b/tests/test_deterministic/test_size/test_initializer.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for Range initialization. """ +"""Tests for Range initialization.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_size/test_named.py b/tests/test_deterministic/test_size/test_named.py index 38bc161..b7d2ba7 100644 --- a/tests/test_deterministic/test_size/test_named.py +++ b/tests/test_deterministic/test_size/test_named.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for named methods of Range objects. """ +"""Tests for named methods of Range objects.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_size/test_operations.py b/tests/test_deterministic/test_size/test_operations.py index afb99b1..8cecfbb 100644 --- a/tests/test_deterministic/test_size/test_operations.py +++ b/tests/test_deterministic/test_size/test_operations.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for operations on Range objects. """ +"""Tests for operations on Range objects.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_size/test_size.py b/tests/test_deterministic/test_size/test_size.py index 08a977a..db88a32 100644 --- a/tests/test_deterministic/test_size/test_size.py +++ b/tests/test_deterministic/test_size/test_size.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for behavior of Range objects. """ +"""Tests for behavior of Range objects.""" # isort: STDLIB import unittest diff --git a/tests/test_deterministic/test_version.py b/tests/test_deterministic/test_version.py index af507e8..e243343 100644 --- a/tests/test_deterministic/test_version.py +++ b/tests/test_deterministic/test_version.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for version information. """ +"""Test for version information.""" # isort: STDLIB import unittest diff --git a/tests/test_hypothesis/test_config.py b/tests/test_hypothesis/test_config.py index b28601a..1c846e9 100644 --- a/tests/test_hypothesis/test_config.py +++ b/tests/test_hypothesis/test_config.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for configuration classes. """ +"""Test for configuration classes.""" # isort: STDLIB import unittest diff --git a/tests/test_hypothesis/test_constants.py b/tests/test_hypothesis/test_constants.py index 4623692..10fc171 100644 --- a/tests/test_hypothesis/test_constants.py +++ b/tests/test_hypothesis/test_constants.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for constants classes. """ +"""Test for constants classes.""" # isort: STDLIB import unittest diff --git a/tests/test_hypothesis/test_size/__init__.py b/tests/test_hypothesis/test_size/__init__.py index d001314..190dd63 100644 --- a/tests/test_hypothesis/test_size/__init__.py +++ b/tests/test_hypothesis/test_size/__init__.py @@ -1 +1 @@ -""" Tests on the _size module. """ +"""Tests on the _size module.""" diff --git a/tests/test_hypothesis/test_size/test_conversions.py b/tests/test_hypothesis/test_size/test_conversions.py index 750f65d..af00f54 100644 --- a/tests/test_hypothesis/test_size/test_conversions.py +++ b/tests/test_hypothesis/test_size/test_conversions.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for operations on Range objects. """ +"""Tests for operations on Range objects.""" # isort: STDLIB import unittest diff --git a/tests/test_hypothesis/test_size/test_initializer.py b/tests/test_hypothesis/test_size/test_initializer.py index 095602f..c74c424 100644 --- a/tests/test_hypothesis/test_size/test_initializer.py +++ b/tests/test_hypothesis/test_size/test_initializer.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for Range initialization. """ +"""Tests for Range initialization.""" # isort: STDLIB import unittest diff --git a/tests/test_hypothesis/test_size/test_named.py b/tests/test_hypothesis/test_size/test_named.py index 9a49743..3b1f228 100644 --- a/tests/test_hypothesis/test_size/test_named.py +++ b/tests/test_hypothesis/test_size/test_named.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for named methods of Range objects. """ +"""Tests for named methods of Range objects.""" # isort: STDLIB import string @@ -185,7 +185,7 @@ def test_bounds(self, size, unit, rounding, bounds): """ (lower, upper) = bounds assume(lower is None or upper is None or lower <= upper) - rounded = size.roundTo(unit, rounding, bounds) + rounded = size.roundTo(unit, rounding, bounds) # pylint: disable=unreachable self.assertTrue(lower is None or lower <= rounded) self.assertTrue(upper is None or upper >= rounded) diff --git a/tests/test_hypothesis/test_size/test_operations.py b/tests/test_hypothesis/test_size/test_operations.py index 0f7d75c..1bd5070 100644 --- a/tests/test_hypothesis/test_size/test_operations.py +++ b/tests/test_hypothesis/test_size/test_operations.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Tests for operations on Range objects. """ +"""Tests for operations on Range objects.""" # isort: STDLIB import copy diff --git a/tests/test_hypothesis/test_size/utils.py b/tests/test_hypothesis/test_size/utils.py index 0d908ec..82a412a 100644 --- a/tests/test_hypothesis/test_size/utils.py +++ b/tests/test_hypothesis/test_size/utils.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Utilities for testing. """ +"""Utilities for testing.""" # isort: THIRDPARTY from hypothesis import strategies diff --git a/tests/test_hypothesis/test_util.py b/tests/test_hypothesis/test_util.py index 359d2e0..7669e8a 100644 --- a/tests/test_hypothesis/test_util.py +++ b/tests/test_hypothesis/test_util.py @@ -15,7 +15,7 @@ # # Red Hat Author(s): Anne Mulhern -""" Test for utility functions. """ +"""Test for utility functions.""" # isort: STDLIB import unittest