TypeDAL 3.0.0b2__py3-none-any.whl → 3.0.0b3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
typedal/__about__.py CHANGED
@@ -5,4 +5,4 @@ This file contains the Version info for this package.
5
5
  # SPDX-FileCopyrightText: 2023-present Robin van der Noord <robinvandernoord@gmail.com>
6
6
  #
7
7
  # SPDX-License-Identifier: MIT
8
- __version__ = "3.0.0-beta.2"
8
+ __version__ = "3.0.0-beta.3"
typedal/config.py CHANGED
@@ -10,9 +10,9 @@ from collections import defaultdict
10
10
  from pathlib import Path
11
11
  from typing import Any, Optional
12
12
 
13
- import black.files
14
13
  import tomli
15
14
  from configuraptor import TypedConfig, alias
15
+ from configuraptor.helpers import find_pyproject_toml
16
16
  from dotenv import dotenv_values, find_dotenv
17
17
 
18
18
  from .types import AnyDict
@@ -122,12 +122,6 @@ class TypeDALConfig(TypedConfig):
122
122
  )
123
123
 
124
124
 
125
- def find_pyproject_toml(directory: str | None = None) -> typing.Optional[str]:
126
- """
127
- Find the project's config toml, looks up until it finds the project root (black's logic).
128
- """
129
- return black.files.find_pyproject_toml((directory or os.getcwd(),))
130
-
131
125
 
132
126
  def _load_toml(path: str | bool | None = True) -> tuple[str, AnyDict]:
133
127
  """
@@ -145,7 +139,7 @@ def _load_toml(path: str | bool | None = True) -> tuple[str, AnyDict]:
145
139
  elif Path(str(path)).is_file():
146
140
  toml_path = str(path)
147
141
  else:
148
- toml_path = find_pyproject_toml(str(path))
142
+ toml_path = find_pyproject_toml(path)
149
143
 
150
144
  if not toml_path:
151
145
  # nothing to load
@@ -155,10 +149,10 @@ def _load_toml(path: str | bool | None = True) -> tuple[str, AnyDict]:
155
149
  with open(toml_path, "rb") as f:
156
150
  data = tomli.load(f)
157
151
 
158
- return toml_path or "", typing.cast(AnyDict, data["tool"]["typedal"])
152
+ return str(toml_path) or "", typing.cast(AnyDict, data["tool"]["typedal"])
159
153
  except Exception as e:
160
154
  warnings.warn(f"Could not load typedal config toml: {e}", source=e)
161
- return toml_path or "", {}
155
+ return str(toml_path) or "", {}
162
156
 
163
157
 
164
158
  def _load_dotenv(path: str | bool | None = True) -> tuple[str, AnyDict]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TypeDAL
3
- Version: 3.0.0b2
3
+ Version: 3.0.0b3
4
4
  Summary: Typing support for PyDAL
5
5
  Project-URL: Documentation, https://typedal.readthedocs.io/
6
6
  Project-URL: Issues, https://github.com/trialandsuccess/TypeDAL/issues
@@ -1,8 +1,8 @@
1
- typedal/__about__.py,sha256=7J0rChIzNtjxCTcGlTAkdW4REFFkP32-PzpI2_7Hb4M,213
1
+ typedal/__about__.py,sha256=z4iEUmnb42f1UnaPUUgxVmozlPXkE5cI1pU9_rHHpqw,213
2
2
  typedal/__init__.py,sha256=QQpLiVl9w9hm2LBxey49Y_tCF_VB2bScVaS_mCjYy54,366
3
3
  typedal/caching.py,sha256=8UABVAhOlBpL96ykmqhxLaFYOe-XeAh7JoGh57OkxP8,11818
4
4
  typedal/cli.py,sha256=5-2U_pQOZNKHmhefiYtkd7g6B0DAXzjf4A1Jh7D37io,18427
5
- typedal/config.py,sha256=IsVgonD3E_V8J1k0YPHIknuGGT7_VwheMGRUFaMHiWc,11848
5
+ typedal/config.py,sha256=KDJXRsIQuFpSZy5XpSJiC_9WGLlmaOexACW0sWdCw54,11626
6
6
  typedal/core.py,sha256=qgJPvlcQYCujsjiiD6SOhWbIr1lxoUDpZUkMnK-mcDQ,95038
7
7
  typedal/fields.py,sha256=z2PD9vLWqBR_zXtiY0DthqTG4AeF3yxKoeuVfGXnSdg,5197
8
8
  typedal/for_py4web.py,sha256=d07b8hL_PvNDUS26Z5fDH2OxWb-IETBuAFPSzrRwm04,1285
@@ -12,7 +12,7 @@ typedal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  typedal/types.py,sha256=1kGkNX6vfGg6ln84AG558C4Zx5ACRz-emrUTnuy-rRY,3410
13
13
  typedal/web2py_py4web_shared.py,sha256=cEbjkK0WOS9Q0nTyZuQaJWffeP4bjrL79Bx0xGy_UOs,1504
14
14
  typedal/serializers/as_json.py,sha256=ffo152W-sARYXym4BzwX709rrO2-QwKk2KunWY8RNl4,2229
15
- typedal-3.0.0b2.dist-info/METADATA,sha256=uv9Nxjh1rJ2hx9Y_kpW-kGiEwwhYnTohSD-pQMTLEf8,7761
16
- typedal-3.0.0b2.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
17
- typedal-3.0.0b2.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
18
- typedal-3.0.0b2.dist-info/RECORD,,
15
+ typedal-3.0.0b3.dist-info/METADATA,sha256=iGCNeR9M9shZ95huWQwV1tepKZyEB2ryoljRoJSahMg,7761
16
+ typedal-3.0.0b3.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
17
+ typedal-3.0.0b3.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
18
+ typedal-3.0.0b3.dist-info/RECORD,,