From f73ed6929b5e689925a4f2fe166f2dde78d1c2a5 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Mon, 3 May 2021 18:13:37 +1000 Subject: [PATCH 1/4] Add whitelist for the pint package. --- vulture/whitelists/pint_whitelist.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 vulture/whitelists/pint_whitelist.py diff --git a/vulture/whitelists/pint_whitelist.py b/vulture/whitelists/pint_whitelist.py new file mode 100644 index 00000000..b5f447d4 --- /dev/null +++ b/vulture/whitelists/pint_whitelist.py @@ -0,0 +1,3 @@ +import pint +ureg = pint.UnitRegistry() +ureg.default_format From 5aeee166a719548c5f51105592256ef9c35e9fe0 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Thu, 20 May 2021 21:30:01 +1000 Subject: [PATCH 2/4] * tox.ini (testenv): Add pint. --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index e457d328..18598257 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,7 @@ commands = [testenv] deps = coverage + pint pytest pytest-cov commands = From c5fd92a1f23d3dd96d984f85dcc7b7da8b9ecaca Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Thu, 9 Jun 2022 10:16:53 +1000 Subject: [PATCH 3/4] Add an entry to CHANGELOG.md for pint whitelisting. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54f0f2bb..4d301d9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Add whitelist for `pint.UnitRegistry.default_formatter` (Ben Elliston, #258). + # 2.4 (2022-05-19) * Print absolute filepaths as relative again (as in version 2.1 and before) From 2aa0a4ccb85eaa1f37f5443344457395979399c9 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Thu, 9 Jun 2022 10:20:33 +1000 Subject: [PATCH 4/4] Fix whitespace issue. --- vulture/whitelists/pint_whitelist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vulture/whitelists/pint_whitelist.py b/vulture/whitelists/pint_whitelist.py index b5f447d4..0fb4a395 100644 --- a/vulture/whitelists/pint_whitelist.py +++ b/vulture/whitelists/pint_whitelist.py @@ -1,3 +1,4 @@ import pint + ureg = pint.UnitRegistry() ureg.default_format