Skip to content

Commit 1704aa2

Browse files
committed
Switch remainder over to BaseConfig usage
1 parent 8140f46 commit 1704aa2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

exasol/toolbox/nox/_package_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _create_parser() -> ArgumentParser:
7171

7272

7373
def _version_check(args: Namespace, config: Config) -> int:
74-
version_file = config.version_file
74+
version_file = config.version_filepath
7575

7676
module_version = Version.from_python_module(version_file)
7777
poetry_version = Version.from_poetry()

noxconfig.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,18 @@ def prepare_release_add_files(self, session, config):
4848
# extra_data: list[str] = ["data"]
4949

5050

51+
ROOT_PATH = Path(__file__).parent
52+
53+
5154
class Config(BaseConfig):
5255
"""Project specific configuration used by nox infrastructure"""
5356

54-
root: Path = Path(__file__).parent
55-
importlinter: Path = Path(__file__).parent / ".import_linter_config"
56-
version_file: Path = Path(__file__).parent / "exasol" / "toolbox" / "version.py"
57+
importlinter: Path = ROOT_PATH / ".import_linter_config"
5758
plugins: Iterable[object] = (UpdateTemplates,)
5859

5960

6061
PROJECT_CONFIG = Config(
61-
root_path=Path(__file__).parent,
62+
root_path=ROOT_PATH,
6263
project_name="toolbox",
6364
add_to_excluded_python_paths=(
6465
# The cookiecutter placeholders do not work well with checks.

0 commit comments

Comments
 (0)