From c19c841a7e419115f1bbe46badf59df28d23a9d6 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 5 Aug 2020 12:09:32 -0400 Subject: [PATCH] style: fix style issues --- azure-pipelines.yml | 1 - setup.py | 5 ++++- src/hepunits/__init__.py | 1 + src/hepunits/constants/__init__.py | 1 + src/hepunits/constants/constants.py | 1 + src/hepunits/units/__init__.py | 9 ++++++--- src/hepunits/units/prefixes.py | 1 + src/hepunits/units/units.py | 8 ++++++-- tests/constants/test_constants.py | 1 + tests/units/test_prefixes.py | 1 + tests/units/test_units.py | 1 + 11 files changed, 23 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 726d7ec..b59b0de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -34,4 +34,3 @@ jobs: - script: | python -m pytest tests/ --cov hepunits --cov-report html --napoleon-docstrings displayName: 'pytest' - diff --git a/setup.py b/setup.py index 9ff73d9..a74acec 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,13 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. from setuptools import setup # Setup will not be able to find the version if these packages are missing -# (Remember, setup.py does not run when installing from a wheel, so only required to make one) +# +# > Remember, setup.py does not run when installing from a wheel, so only +# > required to make one import setuptools_scm # noqa: F401 import toml # noqa: F401 diff --git a/src/hepunits/__init__.py b/src/hepunits/__init__.py index 023cf84..d42f95f 100644 --- a/src/hepunits/__init__.py +++ b/src/hepunits/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. # Convenient access to the version number diff --git a/src/hepunits/constants/__init__.py b/src/hepunits/constants/__init__.py index 62d8560..2227b1d 100644 --- a/src/hepunits/constants/__init__.py +++ b/src/hepunits/constants/__init__.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ This module `hepunits.constants` contains 2 sorts of constants: diff --git a/src/hepunits/constants/constants.py b/src/hepunits/constants/constants.py index a8120c7..5c7ccdf 100644 --- a/src/hepunits/constants/constants.py +++ b/src/hepunits/constants/constants.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ Physical and other handy constants diff --git a/src/hepunits/units/__init__.py b/src/hepunits/units/__init__.py index 7983443..7045340 100644 --- a/src/hepunits/units/__init__.py +++ b/src/hepunits/units/__init__.py @@ -1,9 +1,12 @@ +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. + """ -Subpackage for the HEP System of Units, (derived) physical units -and commonly-used unit prefixes. +Subpackage for the HEP System of Units, (derived) physical units and +commonly-used unit prefixes. -The HEP System of Units is the set of basic units originally defined by the CLHEP project. +The HEP System of Units is the set of basic units originally defined by the +CLHEP project. """ from .prefixes import * diff --git a/src/hepunits/units/prefixes.py b/src/hepunits/units/prefixes.py index 2f7ad13..1cb1b17 100644 --- a/src/hepunits/units/prefixes.py +++ b/src/hepunits/units/prefixes.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ ******************** diff --git a/src/hepunits/units/units.py b/src/hepunits/units/units.py index 0aab005..6bb7e33 100644 --- a/src/hepunits/units/units.py +++ b/src/hepunits/units/units.py @@ -1,10 +1,13 @@ +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. + """ ************************* Module of HEP basic units ************************* -In HEP the System of Units consists of the basic units originally defined by the [CLHEP]_ project: +In HEP the System of Units consists of the basic units originally defined by +the [CLHEP]_ project: =================== ================== ==== Quantity Name Unit @@ -34,7 +37,8 @@ Luminous intensity candela cd =================== ======== ==== -but augments it with handy definitions, changing the basic length and time units. +but augments it with handy definitions, changing the basic length and time +units. This module also defines an extensive set of derived units. diff --git a/tests/constants/test_constants.py b/tests/constants/test_constants.py index fc1bc06..1285763 100644 --- a/tests/constants/test_constants.py +++ b/tests/constants/test_constants.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ Tests for the hepunits.constants.constants module. diff --git a/tests/units/test_prefixes.py b/tests/units/test_prefixes.py index af5ed72..e2bdb6b 100644 --- a/tests/units/test_prefixes.py +++ b/tests/units/test_prefixes.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ Tests for the hepunits.units.prefixes module. diff --git a/tests/units/test_units.py b/tests/units/test_units.py index e4b6b82..cb0cb85 100644 --- a/tests/units/test_units.py +++ b/tests/units/test_units.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license, see LICENSE. """ Tests for the hepunits.units.units module.