From 77dce704af53ae04a685c83894e356f2c3787429 Mon Sep 17 00:00:00 2001 From: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com> Date: Thu, 2 Dec 2021 08:29:42 +0100 Subject: [PATCH] Dont hardcode module name (#145) * Dont hardcode module name * Improve configs * Update changelog --- CHANGELOG.md | 2 +- pyproject.toml | 18 ++++-------------- tomli/__init__.py | 2 +- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e683a..69598c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 2.0.0 (unreleased) +## 2.0.0 - Removed - Python 3.6 support diff --git a/pyproject.toml b/pyproject.toml index c4426ef..0aa803f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,16 +34,6 @@ keywords = ["toml"] "Changelog" = "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md" -[tool.flit.sdist] -exclude = [ - "tests/", - "benchmark/", - "fuzzer/", - ".*", - "CHANGELOG.md", -] - - [tool.isort] # Force imports to be sorted by module, independent of import type force_sort_within_sections = true @@ -139,15 +129,15 @@ commands = [tool.coverage.run] branch = true -omit = ["tests/*", "*/site-packages/*"] +source = ['tomli'] [tool.coverage.report] # Regexes for lines to exclude from consideration exclude_lines = [ - # Have to re-enable the standard pragma - "pragma: no cover", + # Re-enable the standard pragma (with extra strictness) + '# pragma: no cover\b', # Code for static type checkers - "if TYPE_CHECKING:", + 'if TYPE_CHECKING:', # Scripts 'if __name__ == .__main__.:', ] diff --git a/tomli/__init__.py b/tomli/__init__.py index 7bcdbab..72fd480 100644 --- a/tomli/__init__.py +++ b/tomli/__init__.py @@ -6,4 +6,4 @@ from tomli._parser import TOMLDecodeError, load, loads # Pretend this exception was created here. -TOMLDecodeError.__module__ = "tomli" +TOMLDecodeError.__module__ = __name__